Firefox PHP

smtp_email.php has syntax error?

Posted by Stella 
smtp_email.php has syntax error?
January 07, 2008 04:03PM
When trying to register, I get an error warning; "Unexpected { in line 27"

Which is highlighted in red here:

function phorum_smtp_send_messages ($data)
{
    $PHORUM=$GLOBALS["PHORUM"];

    $from      = $data['from'];
    $addresses = $data['addresses'];
    $subject   = $data['subject'];
    $message   = $data['body'];
    $num_addresses = count($addresses);

    $settings  = $PHORUM['smtp_mail'];
    $settings['auth'] = empty($settings['auth'])?false:true;

    if($num_addresses > 0){

        try {

            // include the swiftmailer-class

            require_once SWIFT_DIRECTORY."/Swift.php";
            require_once SWIFT_DIRECTORY."/Swift/Connection/SMTP.php";
I looked at the older smtp_mail.php, but it calls for a different mail plug-in. I know enough PHP to recognise it when i see it, but not anything like enough to figure out what's gone wrong!

Can anyone help? Thanks!
Re: smtp_email.php has syntax error?
January 07, 2008 04:07PM
You are running PHP4 and that module requires PHP5 (like the full phorum-5.2 does too).


Thomas Seifert
Re: smtp_email.php has syntax error?
January 07, 2008 04:13PM
I suppose that explains server errors as well. dammit. ;) Would you suggest the earlier version? phpmail won't work either.

Your phorum answers so very many of my requirements, I am so impressed!
Re: smtp_email.php has syntax error?
January 07, 2008 04:14PM
why not upgrading to php5? most hosts offer that, even more as php4 is end-of-life shortly.
like I told about the server errors already, would need to know the error tell what its about, could be an old mysql-version too.


Thomas Seifert
Re: smtp_email.php has syntax error?
January 07, 2008 04:28PM
yeah, I'm asking him.

All I get is "Internal server error" no further info.
Sorry, only registered users may post in this forum.

Click here to login