Page 1 of 1

pls help parse error with swift mailer

Posted: Sun Aug 31, 2008 10:12 pm
by yvettesio
Hi, i was trying to test swift mailer on my server using the following codes. I didn't edit anything in Swift.php i just simply copied and pasted the lib folder and rename it to swift into my webserver

require_once $lib_dir."swift/Swift.php";
require_once $lib_dir."swift/Switch/Connection/Sendmail.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_Sendmail());

//Create the message
$message =& new Swift_Message("My subject", "My body");

//Now check if Swift actually sends it
if ($swift->send($message, "sendee.com", "sender.com")) {
echo "Sent";
}
else{
echo "Failed";
}

i got this error
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/yvette/public_html/rjs2/libs/swift/Swift.php on line 36

Re: pls help parse error with swift mailer

Posted: Tue Sep 02, 2008 5:22 pm
by andyhoneycutt
the error you are receiving says that the problem is in swift.php, so it may do some good to post the contents of that here, or at least a few lines around line 36 from that file.

-Andy