[Solved] HowTo Change PHP mail sender name - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: [Solved] HowTo Change PHP mail sender name (/thread-977.html) |
[Solved] HowTo Change PHP mail sender name - adigit - 07-16-2007 04:59 PM when tried to send out TEST email with PHP mail and found the sender name is "virtual-user <webmaster@abc.com> " and it's marked as "spam" by gmail! where can i change it, pls? RE: HowTo Change PHP mail sender name - joximu - 07-16-2007 07:54 PM have a look in the php.ini for the domain (abc.com in your example...) /var/www/fcgid/<domain>/phpX/php.ini RE: HowTo Change PHP mail sender name - adigit - 07-16-2007 10:10 PM i should state clearly that i want to change "virtual-user" to something like "webservice" or "info" RE: HowTo Change PHP mail sender name - raphael - 07-17-2007 02:06 AM that can be done passing the $headers arg to mail() and adding the 'From: somebody <mail@mydomain.tld>' header. RE: HowTo Change PHP mail sender name - adigit - 07-17-2007 05:37 PM i change the sendmail_path with -F 'From: somebody <mail@mydomain.tld>', it works for gmail. but for some other emails, it shows the email sender as vu200x@mydomain.tld.local instead. RE: HowTo Change PHP mail sender name - joximu - 07-17-2007 09:42 PM Ok, there are two sort of sender in an e-mail: the envelope sender - which is set in the php.ini and the "from" sender which you can set while sending an email - as raphael stated above: adding some more headers to the "mail()" function in the php-script. Normally the "from" sender is the one which is important - sometimes the envelope sender two - but mostly it's ok if the envelope sender is a valid mail address... Cheers J. RE: HowTo Change PHP mail sender name - adigit - 07-19-2007 05:05 PM thanks joximu, very clear explanation! |