Change default "From" email using php mail() function

Scolpy

Verified User
Joined
Feb 25, 2009
Messages
115
Hello!

How can I change the default email "From", when using
PHP:
mail();
function in case you don't provided the "From Email" parameter.

Now, in my server the default From email is:
Username@Hostname

and I saw that in other servers it's:
Username@Domain


Anyone know how can I change this?

Thanks!
 
Some (old) pre-made scripts only use the mail() function though...... But SMTP would be my advice too.
 
Hey!

Sorry for bouncing this thread, but now some customer told me that it's now adding Username@Domain, but still it's showing Username@Hostname
(the template in Outlook 2010: "Username@Hostname as name Username@Domain").

How can I fix that? :)

Thanks a lot for your help guys :cool:
 
Back
Top