Tip Details Add a Related Tip

Rate as: Positive Negative

553 sorry, your envelope sender domain must exist errors

I just went through a very frustrating problem with sending email from a web server using PHP. When sending emails to certain domains, the mail would fail to go out. There was no error in PHP, but looking at the mail logs (/var/logs/maillog on my server) I could see the following error:

...said: 553 sorry, your envelope sender domain must exist (#5.7.1) (in reply to RCPT TO command)...

I'll spare you the dead-ends, but the bottom line is that if you are using the mail command in PHP you should include an envelope sender. The way you do that is by using the $additional_parameters field of the mail command:

mail($to, $subject, $message, $additional_headers, $additional_parameters)

You set it up the additional_parameters parameter like so:

$additional_parameters = "-r $your_reply_to_email_address";

where you put in your actual email address.

If you make this change to include the envelope sender, it'll take care of the "553 sorry, your envelope sender domain must exist" errors and your mail will get delivered as it should.
Rating: no ratings, 0 total Votes
Categories: PHP server email programming
Added: on Sep 26, 2008 at 3:35 pm
Added By: an anonymous user

Comments on this Tip

Add a Comment
There are no comments for this tip
Your Comment:
(how to format)
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

How to Send E-Mail in PHP: A “Share This” Form

33% positive, 0 comments
– Tip added by Walkere on Feb 06, 2008 at 6:45 pm

Using functions in conditionals in Smarty

Categories: php programming Smarty web
100% positive, 4 comments - last added on Oct 31, 2008 at 2:17 pm
– Tip added by rlansky on Aug 10, 2007 at 1:02 pm

How to find a good and cheap web hosting?

100% positive, 0 comments
– Tip added by an anonymous user on Mar 24, 2008 at 3:15 am

How to Find a Random Date in PHP

20% positive, 0 comments
– Tip added by Walkere on Feb 07, 2008 at 8:25 pm

Something to consider before switching platforms

100% positive, 0 comments
– Tip added by an anonymous user on Sep 25, 2007 at 7:31 pm

Best PHP reference

Categories: PHP coding programming
100% positive, 0 comments
– Tip added by rlansky on Mar 07, 2007 at 2:38 pm

Viewing mailbox information on Exchange 2007

Categories: exchange email server
100% positive, 0 comments
– Tip added by an anonymous user on Nov 19, 2008 at 11:25 am

Determining keywords for your pages

100% positive, 0 comments
– Tip added by an anonymous user on Nov 13, 2008 at 10:28 am

Redirecting in PHP

100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2008 at 7:27 am

Referencing methods in PHP usort

Categories: php coding programming
100% positive, 0 comments
– Tip added by an anonymous user on Jun 13, 2008 at 11:18 am

Copyright date on sites

Categories: web programming php Smarty
100% positive, 0 comments
– Tip added by an anonymous user on Mar 11, 2008 at 8:14 am

How to Syndicate an RSS Feed On Your Site

100% positive, 0 comments
– Tip added by Walkere on Feb 09, 2008 at 5:48 pm

How to Create a Random Password in PHP

100% positive, 0 comments
– Tip added by Walkere on Feb 03, 2008 at 9:14 am

Answering a tricky interview question on swapping

100% positive, 1 comment - last added on Aug 20, 2007 at 8:55 am
– Tip added by an anonymous user on Aug 20, 2007 at 7:26 am

Creating charts in PHP

no ratings, 0 comments
– Tip added by an anonymous user 3 days, 8 hours ago

CakePHP: Working with Associations

no ratings, 0 comments
– Tip added by an anonymous user on May 08, 2008 at 4:09 am

File upload progress meters in PHP

Categories: programming web 2.0 php
no ratings, 0 comments
– Tip added by an anonymous user on Jun 16, 2007 at 5:03 pm

Single versus double quotes in PHP

Categories: PHP coding programming
no ratings, 0 comments
– Tip added by Marcos84 on Mar 31, 2007 at 8:00 pm

Free up memory on your iPhone

100% positive, 0 comments
– Tip added by an anonymous user 6 days, 23 hours ago

GMail themes

no ratings, 0 comments
– Tip added by an anonymous user 3 days, 11 hours ago