2024-12-27 18:26:33 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
SMTP Error: Could not connect to SMTP host. Failed to connect to server
Error sending mail: PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in /home/jaks/others_public_html/ddev.fromagesduquebec.qc.ca/wwwroot/mail/src/PHPMailer.php:2217
Stack trace:
#0 /home/jaks/others_public_html/ddev.fromagesduquebec.qc.ca/wwwroot/mail/src/PHPMailer.php(2003): PHPMailer\PHPMailer\PHPMailer->smtpConnect(Array)
#1 /home/jaks/others_public_html/ddev.fromagesduquebec.qc.ca/wwwroot/mail/src/PHPMailer.php(1662): PHPMailer\PHPMailer\PHPMailer->smtpSend('Date: Fri, 27 D...', 'This is the HTM...')
#2 /home/jaks/others_public_html/ddev.fromagesduquebec.qc.ca/wwwroot/mail/src/PHPMailer.php(1500): PHPMailer\PHPMailer\PHPMailer->postSend()
#3 /home/jaks/others_public_html/ddev.fromagesduquebec.qc.ca/wwwroot/index.php(37): PHPMailer\PHPMailer\PHPMailer->send()
#4 {main}
/* try {
//Server settings
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.office365.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'noreply@plaisirsgourmets.com'; //SMTP username
$mail->Password = 'aoXqWUM&G3Pj$B!pBM*LkoYdD^RqxX'; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption
$mail->Port = 587; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Recipients
$mail->setFrom('noreply@plaisirsgourmets.com', 'noreply');
$mail->addAddress('info@plaisirsgourmets.com', 'Information'); //Add a recipient
// $mail->addAddress('ellen@example.com'); //Name is optional
// $mail->addReplyTo('info@example.com', 'Information');
// $mail->addCC('cc@example.com');
// $mail->addBCC('bcc@example.com');
//Attachments
// $mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments
// $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name
//Content
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body in bold!';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
} */