Page 1 of 1

php mail() function sends as another host

Posted: Wed Apr 12, 2017 7:29 am
by robinsouthchina
Hi!

I have a domain I set up in the control panel. Inside this domain I have a contact page which uses the very simple php mail() function. I have tested it by sending to numerous different email addresses. Some of them receive it and some of them don't. However, I discovered in those email boxes that DID receive the email sent from my webform/contact page that it was sent by way of "[email protected]" and not via the hostname/domain name that I set up after logging into my Vesta control panel. That domain is different. And I thought that the php mail() function would just "naturally" find the correct mail server.

Could you please help me configure things correctly? Because I believe (maybe I am wrong) that the reason some of my receiver email addresses don't get the mail is because it is going as [email protected] but being sent by [email protected] ? ...

Oh I almost forgot: I think vestacp is a great control panel!

Re: php mail() function sends as another host

Posted: Wed Apr 26, 2017 7:55 am
by robinsouthchina
oh... i think i need to modify host records and it should be ok ... i put in the wrong hostname...