Need help with mail config

vps

#1

Hi All,

I am using the mail() function to send out mail from my website; I’ve noticed that the message is from user@psxxxxx.dreamhostps.com instead of mydomain.com. Is there a way to change this?

Thanks.


#2

Yes - set the “From:” header when calling the mail() function.

[php]
mail("destination@example.com", “Subject”, “message”, “From: sender@example.com”);
[/php]


#3

Ahh okay. I passed a string for my FROM parameter so that was why it didn’t work. Thanks a lot for your help!