Closed paulasijit closed 9 months ago
Hej,
do you really use the PHPMailer, i.e., do you enable this feature?
/Micha
I have used a custom script using the same phpmailer and was able to send the email, but the same configuration was not working on the mylittleforum.
Or do I need to enable something from the mylittleforum config to use it?
Hello,
Or do I need to enable something from the mylittleforum config to use it?
Yes, the option php_mailer
should be enabled otherwise PHPs mail()
function is used.
/Micha
Yes its enabled and I have tested it with an custom test script it’s working fine.
Is the problem solved? If so, I will close this issue.
no this is not solved i am able to send email using this code but not the mylittleforum code
elseif ( $_REQUEST['sendmethod'] == "smtp" ) {
ob_start(); //start capturing output buffer because we want to change output to html
$mail = new PHPMailer;
$mail->SMTPDebug = 2;
$mail->IsSMTP();
if ( strpos($hostname, 'cpnl') === FALSE ) //if not cPanel
$mail->Host = 'relay-hosting.secureserver.net';
else
$mail->Host = 'localhost';
$mail->SMTPAuth = false;
$mail->From = $from;
$mail->FromName = 'Mailer';
$mail->AddAddress($toemail);
$mail->Subject = $subject;
$mail->Body = $message;
$mailresult = $mail->Send();
$mailconversation = nl2br(htmlspecialchars(ob_get_clean())); //captures the output of PHPMailer and htmlizes it
if ( !$mailresult ) {
echo 'FAIL: ' . $mail->ErrorInfo . '<br />' . $mailconversation;
} else {
echo $mailconversation;
}
}
Hello,
I am sorry, but I am not able to reproduce your problem. I have switched to PHPMailer and it works as expected.
2023-11-26 09:25:15 SERVER -> CLIENT: 250 2.0.0 Ok: queued as 123B8240044
2023-11-26 09:25:15 CLIENT -> SERVER: QUIT
2023-11-26 09:25:15 SERVER -> CLIENT: 221 2.0.0 Bye
Maybe you can check the $PHP_MAILER->ErrorInfo, i.e.:
$PHP_MAILER->SMTPDebug = 2; // Log-Level: 1, 2,3 4
echo $PHP_MAILER->ErrorInfo;
exit;
/Micha
No further comment since Nov 26, thus, I close the issue.
Here is the config for php_mailer.php