Jump to content

Parse error: syntax error, unexpected T_OBJECT_ Operator


Gorris

Recommended Posts

I am having problems solving a problem on a website that I currently took over. The above error is displayed on the contact form as well as the e-mailer. The code is below:

$transport = Swift_SmtpTransport::newInstance($smtpServer, $smtpPort)
                    ->setUsername($mailUsername)
                    ->setPassword($mailPassword);
                    $mailer = Swift_Mailer::newInstance($transport);
                    // Create the message
                    $message = Swift_Message::newInstance()
                    // Give the message a subject
                    ->setSubject($title)
                    // Set the From address with an associative array
                    ->setFrom(array($mailFromAddress => $mailFromName))
                    // Set the To addresses with an associative array
                    ->setTo(array($email => $name))
                    // Give it a body
                    ->setBody($description, 'text/html')
                    ->addPart($description, 'text/plain')
                    ->setReturnPath($returnEmail)

 

I just started coding in php so I'm not quite sure what needs to be done. Searching google.com has brought no resolve. Any information  would be greatly appreciated. Thank you ahead of time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.