php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22969 sent mail not received by some servers
Submitted: 2003-03-30 20:53 UTC Modified: 2003-03-31 15:35 UTC
From: yellowjacket at email dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.2RC1 OS: apache
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yellowjacket at email dot com
New email:
PHP Version: OS:

 

 [2003-03-30 20:53 UTC] yellowjacket at email dot com
the mail()function is sending mail but some addresses are not receiving it.  What is the issue with mail() that causes some servers not to deliver the mail?  For example
I can not send email to yellowjacket@email.com or to my hotmail account.  There is a lot of discussion about this problem on various sites but no solution.  I tried adding the return-path as suggested by several sites.

Do you have a fix?

thanks,

Yellowjacket

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-31 01:35 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 [2003-03-31 10:03 UTC] yellowjacket at email dot com
Since I can sent email to those servers using cgi script and from other email accounts, there is something that PHP is or is not doing that is causing the servers to reject the incoming email if you feel that is "bogus" or not a bug fine but my definition of a bug is something that does not work consistently and mail() does not.

thanks,

yellowjacket
 [2003-03-31 10:21 UTC] yellowjacket at email dot com
Please note that I am receiving an auto reply from you to yellowjacket@email.com which I am sure is being sent with PHP mail().  This would imply that you know what the problem is since your mail is being received and mine is not.

If this is not a bug it is a least incomplete documentation of how to use mail() to ensure delivery to all server types.

What is the appropriate syntax for mail() to ensure delivery?

Thank you.
 [2003-03-31 15:35 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

your CGI is likely adding some additional headers, which is what allows your e-mail to go through. The solution would be to see what headers are sent when CGI is used and what headers are sent by PHP and use the headers argument of the mail() function to add any missing headers.
 [2003-08-23 23:25 UTC] iandbigejunk at yahoo dot com
----------- (A)  solution -----------------------------

crdesignprod at NO_SPAMyahoo dot com
30-Aug-2002 10:52 
This is a problem I ran into that really had me stumped for awhile.

I was using mail() to send messages from a bulletin board I created via a form in order 
to keep users email addresses private (read no email mining possible). Problem was some 
people were not getting the messages. After testing on MANY different email accounts 
I was beginning to get stumped.

It seems that some ISP's and servers require that the Return-Path header email address 
match the From email address in order for it to be passed onto the users account. 
By adding 

-f email@address.com

as the last parameter in the mail function to the same as the From address everything 
started getting recieved as it should. Here's two examples.

mail($to, $subject, $body, $from);

resulted in some people not receiving the message.

but...

mail($to, $subject, $body, $from, "-f $from_email_address");

everyone got the message as intended.

Hope this helps someone else out as it had me totally baffled until I started comparing 
the full headers of my email messages. 

------------ (B) Additional Problems Solved (solution 1) ----------
ziwap at hotmail dot com
02-Mar-2002 07:47 
To remove the X-authentication-warning put apache (or the user running httpd processed) 
into the list of "trusted users" 

------------ (B) Additional Problems Solved (solution 2) ----------
phpdocs at razorburn dot org
28-Feb-2002 04:43 
If you don't like the X-authentication-warning header from using the -f flag, you can 
remove authwarnings from sendmail's PrivacyOptions.

sendmail.mc: define(`confPRIVACY_FLAGS', `authwarnings,...')dnl

sendmail.cf: O PrivacyOptions=authwarnings,... 

------------------------ end of solution -------------------------
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC