View Single Post
  #5  
Old 31st March 2009, 21:35
Izinyoka Izinyoka is offline
Junior Member
 
Join Date: Feb 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by edge View Post
Sure there is.
Make sure you set a from email address in the header!

PHP Code:
$Name "Me"//senders name 
$email "me@me.tld"//senders e-mail adress 
$recipient "to@to.tld; //recipient 
$mail_body = "
Hello."; //mail body 
$subject = "
The subject of message"; //subject 
$header = "
From". $Name . " <" . $email . ">"; //optional headerfields 
mail($recipient, $subject, $mail_body, $header); 
There is a from address in the header and it is the correct one, but the return-path is the user apache is running as @ the server domain, not the actual hosted website's domain.
And when the recipient mail server validates the email, it validates the return-path, not the from address.

I understand this is how a normal Unix mail system would work. A user sends a mail, it uses the username @ domain, there is no seperate email field.

I have been working on this issue on and off for almost 2 years... I doubt its going to be as simple as that.
Reply With Quote