SMTP server response: 553
So you probably had recently finished installing Mercury Mail, maybe using XAMPP or kind-of. As I checked, without modifying anything from download, it always happens. I mean running Windows (XP Service Pack 2), because of Mac version of XAMPP doesn't support Mercury Mail Server.
And, for my surprise, I got an error:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in /root/web/tests/mail.php on line 3
Where my piece of code was:
$email = "me@tomasdev.com.ar";
$subject = "Hello";
$body = "Hi dude, how are you?";
mail($email, $subject, $body);
?>
So after reading stuff and documentation of PHP, I found that you must set sendmail_from in your php.ini but for personal reasons, I don't touch the configuration files (you shouldn't either). So the solution I found was adding the necessary settings via code:
$email = "me@tomasdev.com.ar";
$subject = "Hello";
$body = "Hi dude, how are you?";
$headers = "From: anonymous@anonymous.com"
mail($email, $subject, $body, $headers);
?>
But again, something happend! (last code fixes the previous error, but there is still an error)
Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in /root/web/tests/mail.php on line 3
And, the magic fix is just following this guide of 4 simple steps.
(I MADE IT SO PLEASE DONT COPY PASTE)
- Step 1:
Open your XAMPP Control Panel and click on Admin Button for Mail

- Step 2:
On the Mercury Mail administration window, go to Configuration » MercuryS SMTP Server which will open a new window.

- Step 3:
Go to the Connection Control tab and look for Relaying Control zone.

- Step 4:
So probably there is an option checked which says Do not permit SMTP relaying of non-local mail. Make sure to uncheck that option, and then click OK/Apply.

That's all, and it should fix your problems for mailing. Any question, asking is free.
About this entry
You’re currently reading “ SMTP server response: 553 ,” an entry on $blog->myself(“tom”);
- Published:
- 6.20.09 / 10pm
- Category:
- Solved Problems, Web developing
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]