I am using PHP with Apache on Linux, with Sendmail. I use the PHP
MAIL FROM (example firstname.lastname@example.org) and some remote mail servers reject this because the domain doesn't exist (obviously). Using
EDIT: If I add a header in the fourth field of the
From field in the headers of the body of the message, and DOES NOT change the envelope
I can force it by spawning sendmail with
sendmail -t -odb -oi -frealname@realhost and piping the email contents to it. Is this a better approach?
Is there a better, simpler, more PHP appropriate way of doing this?
EDIT: The bottom line is I should have RTM. Thanks for the answers folks, the fifth parameter works and all is well.