IsSMTP(); $mail->SMTPDebug = 4; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->IsHTML(true); //Username to use for SMTP authentication $mail->Username = "energyfoodsorders@gmail.com"; $mail->Password = "npow evbg dkin meow"; //Set who the message is to be sent from $mail->setFrom('energyfoodsorders@gmail.com', 'Energy Foods'); //Set an alternative reply-to address //Set who the message is to be sent to $mail->addAddress('energyfoodsorders@gmail.com', 'Energy Foods'); //Set the subject line $mail->Subject = 'Test Email'; //Read an HTML message body from an external file, convert referenced images to embedded, //convert HTML into a basic plain-text alternative body $mail->Body = 'This is a test email sent via PHPMailer using Google Workspace SMTP.'; // $mail->msgHTML($msg_to_verify); //Replace the plain text body with one created manually $mail->AltBody = 'This is a plain-text message body'; $mail->send(); //send the message, check for errors // if (!$mail->send()) { // echo "Mailer Error: " . $mail->ErrorInfo; // } else { // echo "Message sent!"; // } ?>