I'm stumped by this. Code like this works both from the command line (php -f mailtest.php) and via the web. No errors, mail is seen hitting my local ssmtp instance (this host is not running the mail server portion of froxlor):
<?php
ini_set('display_errors',1);
error_reporting( E_ALL );
$from ="emailtest@YOURDOMAIN";
$to ="YOUREMAILADDRESS";
$subject ="PHP Mail Test script";
$message ="This is a test to check the PHP Mail functionality";
$headers ="From:". $from;
mail($to,$subject,$message, $headers);
echo "Test email sent";?>
WordPress, which uses PHPMailer fails to send mail silently. No errors in php-fpm's log, no errors in apache, and if I turn on php errors and WP_DEBUG, nothing, just silent failure.
Also noticed that when I add new customers in froxlor, there is an error about not being able to send email. AND froxlor uses PHPMailer.
So what might be stopping PHPMailer from working system-wide, but not php's mail() function?
Question
sporkman
I'm stumped by this. Code like this works both from the command line (php -f mailtest.php) and via the web. No errors, mail is seen hitting my local ssmtp instance (this host is not running the mail server portion of froxlor):
WordPress, which uses PHPMailer fails to send mail silently. No errors in php-fpm's log, no errors in apache, and if I turn on php errors and WP_DEBUG, nothing, just silent failure.
Also noticed that when I add new customers in froxlor, there is an error about not being able to send email. AND froxlor uses PHPMailer.
So what might be stopping PHPMailer from working system-wide, but not php's mail() function?
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.