how would i make it so i could send mail from different usernames with php? for example in my ini file i have it set to user1@host.com how would i change it so it sent from user2@host.com without changing the php.ini file? all help is appreciated..
This should work. 🙂
$your_new_email = "user2@host.com";
mail("$to_this_email_address", "$the_subject", $the_email_message, "From: $your_new_email");