I have a script that is for registering users on the site, and will send a confirmation/verification email , however I am getting a n error and cannot seem to find what is wrong, I am new to swiftmailer.
Error is
Script i am using is as follows :
$transporter = (new Swift_SmtpTransport('smtp.gmail.com', 465, 'ssl'))
->setUsername('xxxxxxxxxxxxx')
->setPassword('xxxxxxxxxxxxx');
$mailer = new Swift_Mailer($transporter);
// Create a message
$message = (new Swift_Message('Please Verify Email Address!'))
->setFrom([$email => $firstname . ' ' . $lastname])
->setTo($email)
->addPart($msg, "text/html")
->setBody('Hello! User');
// Send the message
$result = $mailer->send($message);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…