I have a new installation of Swift Mailer. When sending emails it fails and in the .errorlog file I have the following:
[25-Jun-2019 09:51:32 America/Detroit] PHP Parse error: syntax error, unexpected '?' in /home/qetbcdfu/public_html/swift/lib/classes/Swift/Transport/EsmtpTransport.php on line 213
Help appreciated!
require_once 'lib/swift_required.php';
// Create the Transport
$transport = (new Swift_SmtpTransport('mail.authsmtp.com', 25))
->setUsername('hidden')
->setPassword('hidden');
// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);
// Create a message
$themessage .= "<p>Hi this is an email message that is a test message from Cedine's Swift AuthSMTP programming interface. I hope you have enjoyed receiving this message.</p><p><strong>Please delete this message.</strong></p>";
$message = Swift_Message::newInstance('An Invitation to Join the Global CHE Network')
->setFrom('jim@jimnull.com')
->setTo(array('jsnull@outlook.com', 'jnull1955@gmail.com'))
->setBody($themessage, 'text/html');
// Send the message
$result = $mailer->send($message);
print "<p>Sent</p>";