Specify sender email-id and name in $mail->setFrom() and recipient email-id and name in $mail->addAddress(). $mail->Port = 587 // TCP port to connect to $mail->SMTPSecure = 'tls' //PHPMailer::ENCRYPTION_STARTTLS Enable TLS encryption, `PHPMailer::ENCRYPTION_SMTPS` also accepted $mail->Password = 'password' // SMTP password $mail->SMTPAuth = true // Enable SMTP authentication $mail->Host = '' // Specify main and backup SMTP servers NOTE – All this value get from previous step. Assign 'tls' in $mail->SMTPSecure and 587 to $mail->Port. Specify server host in $mail->Host, username in $mail->Username, and password in $mail->Password. $mail->SMTPDebug = 0 // 0 - Disable Debugging, 2 - Responses received from the server Import PHPMailer, Exception class and include 'vendor/autoload.php'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |