Untitled
unknown
plain_text
2 years ago
1.3 kB
12
Indexable
<?php
//Import PHPMailer classes into the global namespace
//These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
//Load Composer's autoloader
require 'mailer/autoload.php';
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer();
//Server settings
//$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'ahxte112211@gmail.com'; //SMTP username
$mail->Password = 'hwym srdz ixza qwte'; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Content format
$mail->isHTML(true); //Set email format to HTML
$mail->CharSet = "UTF-8";
?>
Editor is loading...
Leave a Comment