I am preparing to use PHP mail to send and email to an automated system. My problem is that I need to be able to change the from email address with every message I send. Now, it automatically defaults to the address for the server that sent the mail.
It currently sends like this;
mail( "to:", "subject:", "message:", "email header:" );
I need it to send like this;
mail( "to:", "subject:", "message:", "from:" );
Is there a way to do this with PHP? Do I have to use a different email object or something?