-
Hello, despite the debug level (SMTP::DEBUG_LOWLEVEL / 4), which should show me all messages, I only get the error message: Can you tell me how to get more information about the error? PHPMailer-Version: 6.8.0 Code: <?php
#####################
# LOAD MAILER #
#####################
require BASEPATH . '/includes/PHPMailer-master/src/Exception.php';
require BASEPATH . '/includes/PHPMailer-master/src/PHPMailer.php';
require BASEPATH . '/includes/PHPMailer-master/src/SMTP.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
$phpmail_customer_mail = new PHPMailer();
$phpmail_customer_mail->isSMTP();
$phpmail_customer_mail->Host = SMTP_HOST;
$phpmail_customer_mail->SMTPAuth = true;
$phpmail_customer_mail->Username = SMTP_USER;
$phpmail_customer_mail->Password = SMTP_PASS;
$phpmail_customer_mail->SMTPSecure = SMTP_PROTOCOL;
$phpmail_customer_mail->Port = SMTP_PORT;
$phpmail_customer_mail->setFrom(SMTP_MAIL, $from_name);
$phpmail_customer_mail->addReplyTo(SMTP_MAIL, $from_name);
// Set Debug Level
$phpmail_mail->SMTPDebug = SMTP::DEBUG_LOWLEVEL;
// Add Receiver
$phpmail_customer_mail->addAddress($mailto, $sender);
// Add File
$phpmail_customer_mail->addAttachment($file);
//Content
$phpmail_customer_mail->Subject = $subject;
$phpmail_customer_mail->msgHTML($mailtext);
$phpmail_customer_mail->AltBody = $mailtext;
$phpmail_customer_mail->CharSet = 'UTF-8';
// Send Mail
if (!$phpmail_customer_mail->send()) {
echo 'Mailer Error: ' . $phpmail_customer_mail->ErrorInfo;
} else {
echo 'Message sent!';
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
After changing the debug-level to the number 4 i got more informations, (although not much more):
Is there a possibility to get more informations about the |
Beta Was this translation helpful? Give feedback.
Port is an int:
SMTPSecure
is case-sensitive:It also has its own constant already:
PHPMailer::ENCRYPTION_SMTPS