I have a script that I use on two different sites and servers. This script includes sending an email. On the first server the from field shows "Nobody" when receiving the email. On the second one the from field shows "username@myserver.hostgator.com". How can I change this values ? Thanks, green for a good answer of course
Is this in the same email client? Can you post the header of both emails? Same software just different servers?
Is this in the same email client? yes Can you post the header of both emails? I cannot post that here Same software just different servers? Yes, totally identical.
Some software will take and give it the name of "NoReply". Which appears to be what is happening. You can go into the software and set the header to set the name and email at the same time and that should make it more consistent across all servers. Appears 1 OS is trying to do some things for you.
Both the accounts are on hostgator, its two different hostgator servers, shared accounts. I cannot change anything else than what I can do in cPanel. Beside the "from" is not "NoReply", its "Nobody".
Is the From from the same address? If you can't change the script, what kind of solution are you looking for?
From Outlook Express, the email headers: server1:From: Nobody <nobody@myserver1.hostgator.com> server2:From: I am looking for a solution in cPanel or something.
Well this is best for HostGator or someone with that host to answer. They should know how to fix this. Sorry I couldn't really help. I tried.
If you just add a "from-variable" in your mail() call, it won't work on some servers (talking based on my experience). Just make sure you include this part in your header and "from-email-address" should appear correctly wherever you host your script: $headers = "From: You Name <youremail@yourdomain.com>\r\n" . "X-Mailer: php"; Code (markup): Then send your email, for example: $to = 'someones@email.com'; $subject = 'The Email Subject'; $message = 'The Email Message Itself'; mail($to, $subject, $message, $headers); Code (markup):