I receive the following error when trying send emails via a distribution list e.g email to SMS:
This is the mail system at host email-to-sms-0x.xxx.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
(expanded from
<7afc3e8f8de82#dist.test.com>): Command died with status
255: "/etc/mail/XXX.php". Command output: _
Final-Recipient: rfc822; dist-TEST-com#email-to-sms-02.test.com
Original-Recipient: rfc811;7afc3e8f8de82#dist.test.com
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; _
The server uses postfix and I am unsure on how to proceed.
Would this be due to a php cronjob not executing or the permissions being incorrect?
Any help would be appreciated.
This is a Centos OS.
I have change some of the output to protect data.
Kind Regards
Ali G
You need to check the mail.log on email-to-sms-0x.xxx.com -- since Postfix doesn't disclose all information it obtained in the bounce.
It's probably a permission issue, yes :)
Related
I have a daily newsletter I send out to a list of people each day. I use PHP and the PHPMailer object to send the emails.
This has been working fine up until today when I didn't get an email (test) and I checked the logs to find that intermittently I was getting SMTP errors back from
mail->Send();
Method of the class on SOME of the people - not all of them.
All of the emails were exactly the same size (length in characters) apart from their name and email address.
The error details from
$mail->ErrorInfo;
Included these two errors
SMTP Error: Data not accepted.<p>SMTP server error: 2.1.5 Ok
SMTP Error: Data not accepted.<p>SMTP server error: </p>
Why there are broken P tags in the error message I have no idea - also why the first error has OK in it??
However other people in the loop had emails go out fine.
Also when I put the script into test mode so ONLY these failures were emailed out (so one call of the script = one email to one person), I found no problem and the people got their emaail.
Now I asked tech support what the error meant and got back "Google it" and I can't find the error 2.1.5 OK anywhere. I don't really get why it says OK after an error either.
As a test for tomorrow I put a test in for a failed Send and then a Sleep for 5 seconds with a retry.
I don't know if this will help but I thought that maybe my SMTP server which is on the same server as my script (Rackspace VPS Linux) was having temporary issues connecting so a sleep might be handy in this situation.
This is the first time I have had this issue, I haven't rebooted APACHE or my server (or mailserver) and before this script I had another one send out 403 emails without any problem.
It would be nice to know what the error is and why it happened though.
Rob
That error is defined exactly where you would expect it to be - in the RFC that defines SMTP error codes. 2.1.5 means "Destination address valid". That it starts with a 2 means it's not an error as such, but a response code - warnings and errors start with 4 and 5. Why you got it, I don't know, but it certainly seems it was not expected in that context. Mail servers often have problems - they run out of disk space, get swamped by spam filtering, and this is why mail servers have queues. Sending directly using PHPMailer's SMTP class is not appropriate for high-volume sending - using SMTP is fine, but point it at a proper (nearby) MTA that can handle deliveries properly.
As for the garbled ErrorInfo content, I suspect you are using an old version of PHPMailer - the debug output has been cleaned up fairly recently. Another thing that changed lately is the handling of errors during single sends to multiple recipients (e.g. BCCs) - it's now much more likely to get to the end of a long recipient list without giving up than it was before.
Ever since OS X 10.8 I've used the steps here to test sending mail with php.
Basically it redirects php's sendmail_path to a .php script that saves the email message as a .emlx file and then opens Apple Mail (and that file) automatically.
This worked well until I upgraded to 10.10
After the upgrade to 10.10 all seems to work, the .emlx file is created as expected right where it is supposed to be but Apple Mail does not open up.
I'm getting the following error in my apache error_log
LSOpenURLsWithRole() failed with error -10810 for the file /Users/jason/smtp_out/2014-10-22_10.12.20_587.emlx.
I've got no clue about what LSOpenURLsWithRole() is all about. I'm guessing this is something around php not being able to open the .emlx file up in Apple Mail automatically (I can dbl click it and it opens in Mail as expected)
I've changed all the permissions as explained in the original site. Is there something I'm missing that would get the .emlx file to open automatically? (Does this need to be changed because of 10.10?)
UPDATE
As a temp fix, I've reverted to using a folder action but I'd still like to figure out what LSOpenURLsWithRole() failed with error -10810 is all about
I suggest to use Mailtrap instead. All you need to do is configure SMTP to use their server:
Host: mailtrap.io
Port: 25 or 465 or 2525
Username: your-username
Password: your-password
Auth: PLAIN, LOGIN and CRAM-MD5
TLS: Optional
All emails will be sent to Mailtrap regardless of the email address. You will then be able to access sent messages on mailtrap.io, you can view the message in HTML and text format, run an analysis on the message, etc.
Whenever a new user tries to create a new account, they get this message
Tried to send you an email but failed!
I tried setting up an email and using the smtp settings in Site
Administration -> Message output -> Email and that did not work.
I called my Host company (inmotion hosting) and they verified that my
settings were correct.
I tried just leaving the settings blank in email so that the phpmailer would send the emails, but that is not working and I still get the same message.
I have searched all overand I cannot find any helpful information on why this is happening,
but I find A LOT of people who are having this issue.
This has turned into a MAJOR show stopper and I am wondering what avenues I have to troubleshoot this. Does anyone have any information on how this is fixed?
Thanks in advance.
It might be missing a "from" email - have you got a support email set up?
/admin/settings.php?section=supportcontact
Or go to Site Administration > Server -> Support contact
I've had a similar issue. It works fine for the first three users created (in quick succession) but then fails for a few minutes. Enabling debugging (Site Admin -> Development -> Debugging page) showed that this was due to timeouts:
Debug info:
Error code: auth_emailnoemail
Stack trace:
line 463 of /lib/setuplib.php: moodle_exception thrown
line 106 of /auth/email/auth.php: call to print_error()
line 70 of /login/signup.php: call to auth_plugin_email->user_signup()
Output buffer: profile_field_PC<pre> SMTP -> ERROR: Failed to connect to server: Connection timed out (110)SMTP connect() failed. </pre>
This appears to be an anti-spam "feature" of the Amazon SES service we were using, which we will need to get around.
I know this is an old post but I will add my solution and give many thanks to Russell for that part of it.
This site had been moved over to Bluehost and come to discover that client did not set up an email account for Admin User - so in addition to checking that there is an email in the Admin settings, also verify that that email address exists and is reachable!
we had an issue with our sendmail program recently. for some reason it wasn't working. i ended up fixing it, but we're still not receiving confirmation emails from the store. it doesn't give us an error (as far as i can tell), but it simply isn't sending. is there anywhere somebody could suggest i look to fix it? log files, PHP files, anything? i'm at a loss and i've been working on this for 2 days with no results. the client is getting more and more impatient.
the email user is receiving all other emails, the sendmail program is working properly, etc. I have no clue what could be wrong. can somebody at least point me in the right direction?
You can do the fallow steps to trouble shoot the problem
run this command in the server:
echo "This is a test." | mail -s Testing someone#somedomain.com
check is the email daemon is working
check the email log server at /var/logs/sendmail this depend of your enail server software
try this configuration
Go to System > Configuration > ADVANCED > System > Mail Sending Settings
Disable Email Communications = No
Host = I changed it from localhost to mail.mydomain.com
Port (25) = 25
Set Return-Path = No
Good Luck
Is there any way how to check response for e-mail status in PHP script? For example - if I have php script which uses functions like $mail->Send() - is there any way how to check return statuses before sending this email? It just check or send "fake" email or something to know for example if e-mail is full or other errors like these:
Remote host said: 552 4.2.2 User has full mailbox.
Or something like this:
Remote host said: 550 5.1.1 Sorry, no mailbox here by that name.
Thank you.
I really doubt you could do that because it would mean that bad intentioned people could scan servers for email addresses.