/*
$mail = new PHPMailer(); // defaults to using php "mail()"
$mail->CharSet = 'UTF-8';
//---Setting SMTP ---
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = 'smtp.gmail.com'; // SMTP server
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = 'tls'; // enable SMTP TLS connection
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = '[email protected]'; // SMTP account username
$mail->Password = 'ThePassword'; // SMTP account password
//--- Ending Smtp Settings
$mail->From = '[email protected]';
$mail->FromName = 'Datikan 224';
$To = '[email protected]';
$ToName = 'Saeed Nobakht';
$mail->AddAddress(strtolower($To), $ToName);
$mail->Subject = 'test';
$mail->MsgHTML('xxx zzz cccc');
if(!$mail->Send()) {
echo("Mailer Error: " . $mail->ErrorInfo);
}
*/
Article ID: 11
Created On: Sat, Sep 5, 2020 at 1:09 PM
Last Updated On: Sun, Sep 6, 2020 at 1:07 AM
Authored by: Saeed Nobakht [[email protected]]
Online URL: https://www.navel.ir/article/phpmailer-send-mail-class-11.html