Jump to content


Photo

Php Mail "Nobody" problem


  • Please log in to reply
2 replies to this topic

#1 siezma

siezma
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 May 2006 - 08:18 PM

Hello everbody!

I have a problem about php mail.The mail function,which i use, is below;

mail($recipient, $subject, $msg,"From: $from");

The script works well.I have a mail address from Yahoo and i can get the mails which the script sents.But
I have realized that some of the users can't get the mails because of the reason below;

May 17 10:28:09 orange sendmail[17523]: k4HES9c9017523:
ruleset=check_mail,
arg1
=<nobody@tttech.ekkum.ca>, relay=ikdesh.ekkum.com [64.187.28.130],
reject=553 5.
1.8 <nobody@tttech.ekkum.ca>... Domain of sender address
nobody@tttech.ekkum.ca
does not exist

Sender seems to be 'nobody@domainname'.If the users have a picky SMTP Server like the one above,they can't get the mail!!!

Is there a way to work around it by setting some
sender?

I have search on the net and i have found one solution,but the sender says that it is not gaurantee!!

mail($recipient,$subject, $msg,"From: mail@domainname\nReply-To:mail@domainname\nX-Mailer:PHP/" . phpversion());

Thanks
Have a great day




#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 18 May 2006 - 08:38 PM

Use the 5th parameter to the mail() function to specify the "Return-path:" header.
<?php
$fifth_param = "-f $from";
mail($recipient, $subject, $msg,"From: $from",$fifth_param);
?>

Ken

#3 siezma

siezma
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 May 2006 - 09:16 PM

[!--quoteo(post=375059:date=May 18 2006, 04:38 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ May 18 2006, 04:38 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Use the 5th parameter to the mail() function to specify the "Return-path:" header.
<?php
$fifth_param = "-f $from";
mail($recipient, $subject, $msg,"From: $from",$fifth_param);
?>

Ken
[/quote]

[img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Thanks a lot Ken. I will try the fifth parameter.

Bye





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users