newbie question - error from Swift.php file?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
pmaisonneuve
Forum Newbie
Posts: 1
Joined: Mon Nov 19, 2007 11:35 pm

newbie question - error from Swift.php file?

Post by pmaisonneuve »

I am getting the following error after trying my first email:

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/lunches/public_html/swift/Swift.php on line 36

Line 36 in Swift.php is: "const VERSION = "3.3.2";"

I don't see anything particularly wrong with any of the code, but it doesn't like defining the constants. If I comment the first one out, I get the same error on the second one.

Anyone seen something similar? I'm sure this is something silly, but this is my first time using Swift.

Thanks in advance for any assistance.

Paul
choubix
Forum Commoner
Posts: 42
Joined: Tue Nov 06, 2007 12:21 pm

Post by choubix »

bonjour Paul et bienvenue,

I had a couple of problems with swift (mostly due to my own incompetence...) but I've never had this one.
As it seems you get parse errors I remember seeing in the FAQ something about this.

basically: if you get the wrong version of swft you will get parse errors (likely to occur if you are using the php5 version of swift on a server using php4).

found this for you:
http://www.swiftmailer.org/wikidocs/v3/faq/parseerror

hope it is relevant adn that will help you.
Post Reply