Hi,
Has anyone encountered problems with this?
Some mail servers do not receive the emails that are sent using this function.
Example, sourceforge.net servers
Does anyone have any knowledge on this? thanks
| SitePoint Sponsor |





Hi,
Has anyone encountered problems with this?
Some mail servers do not receive the emails that are sent using this function.
Example, sourceforge.net servers
Does anyone have any knowledge on this? thanks
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein





It's much much much more likely that you're doing something wrong than mail() is.
ck :: bringing chris to the masses.





Here's my code,
even a normal code likePHP Code:$moddate = time();
$hour = 12 * 3600;
$newtime = $moddate+$hour;
$time = date("d/m/y H:i:s", $newtime);
$headers = "From: <" . $user_email . ">\n";
$headers .= "Reply-To: <" . $user_email . ">\n";
$headers .= "X-Sender: <" . $user_email . ">\n";
$headers .= "X-Mailer: $script_name\n";
$headers = "DATE : $time\n";
$headers .= "Return-Path: <" . $user_email . ">\n";
$headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$message = stripslashes("$message");
mail("$email","$system_name | $subject","$message2","$headers");
does not work. it shows email sent, but i don;t receive the emailPHP Code:$sendmail = mail ("XXXXX@users.sourceforge.net", "Subject", "Message : Hello!");
if ($sendmail) echo 'E-Mail Sent';
else echo 'E-Mail not Sent';
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
thats a problem with your sendmail or the other mail program you are using... check your email logs to verify something was sent out..
i dunno...



Well two things. First is your php.ini file may have nobody set as the default from user, which some servers discard as spam. Second, you are missing the . in front of the = on the DATE line...
$headers = "DATE : $time\n";
should be
$headers .= "DATE : $time\n";
otherwise you're erasing From, Reply-to, etc.
Kevin





thanks.Originally posted by tubedogg
Well two things. First is your php.ini file may have nobody set as the default from user, which some servers discard as spam. Second, you are missing the . in front of the = on the DATE line...
$headers = "DATE : $time\n";
should be
$headers .= "DATE : $time\n";
otherwise you're erasing From, Reply-to, etc.
the date was a mistake on my part when making the post. i included the . in my script.
i noticed that if i sent the mail without specifying a 'from', when a person receives the email, its 'nobody' and email is like the server host name.
is that the cause of it?
but as i said, when specifying a From user, its alright. any clues?
how do i check the email logs?Originally posted by kunal
thats a problem with your sendmail or the other mail program you are using... check your email logs to verify something was sent out..
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein





being on a free host, you most likely can't. not sure about sourceforge though.
contact your tech support for sourceforge to find out if you can have/have access to email logs.





no. I'm on hostrocket. the problem with emails not arriving resides on sourceforge mail servers.Originally posted by Defender1
being on a free host, you most likely can't. not sure about sourceforge though.
contact your tech support for sourceforge to find out if you can have/have access to email logs.
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein





well, my previous instructions should still apply.
contact your tech support and ask em![]()
This is not a very technically detailed answer because I don't know the technical details, however, this is my guess on what is happening. The sourceforge sendmail or whatever SMTP server is not accepting you mail because you are "spoofing" the X-Sender and X-mailer headers and it is onto youWhy do you need to spoof these headers? Perhaps the best thing is to contact sorceforge and ask them why their server doesn't accept the mail and show them your code.





uh huh..that really has alot of sense..i'll try without it and let yo uknow the results. thanksOriginally posted by freakysid
This is not a very technically detailed answer because I don't know the technical details, however, this is my guess on what is happening. The sourceforge sendmail or whatever SMTP server is not accepting you mail because you are "spoofing" the X-Sender and X-mailer headers and it is onto youWhy do you need to spoof these headers? Perhaps the best thing is to contact sorceforge and ask them why their server doesn't accept the mail and show them your code.
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
Bookmarks