php - Swiftmail parsing error -
i moved swiftmailer people have said things it. when used documentation on how set up, i'm getting strange error. if code wrong.
the error showing : parse error: syntax error, unexpected '?' in mailer\classes\swift\transport\esmtptransport.php on line 211
i haven't modified file atoll , it's throwing error.
i'm calling username , password config file giving them define php function.
my code being used :
define("authentication_donotredirect", 1); require("../main_config.php"); $site_config = new site_config(); $from = $site_config->grabsitesettings_manual($con, 'name'); require 'mailer/swift_required.php'; $transport = swift_smtptransport::newinstance('smtp.gmail.com',465,'ssl')->setusername(gmail_mail)->setpassword(gmail_pass); $swift = swift_message::newinstance($transport); $content = "this test message."; $message = swift_message::newinstance("this test email") ->setfrom('admin@admin.com') ->setto('benzahdd55@outlook.com') ->setbody($content,'text/html') ->addpart(strip_tags($content),'text/plain'); $swift->send($message); $myfile = fopen("loggy.txt", "w"); $txt = "success\n"; fwrite($myfile, $txt); fclose($myfile);
Comments
Post a Comment