studius Posted December 21, 2017 Posted December 21, 2017 I was writing PHP code to send users of my site an automated email for account creation/verification... However, when I tested the code everything worked just fine, except the sender is myusername@myusername.heliohost.org. How can I change this address so that users see that the email is sent by myusername@mydomain.com instead? I know it has something to do with changing Service Configuration/PHP Configuration but I can't even find that in my cPanel... Please advise on what to do next. Thanks in advance!
Krydos Posted December 21, 2017 Posted December 21, 2017 Just set the From: header. https://www.w3schools.com/php/func_mail_mail.asp
studius Posted December 21, 2017 Author Posted December 21, 2017 (edited) Hi, thank you so much for the quick response. Obviously, I missed a critical part of the code and jumped to conclusions. I tried it with the header From code added and now the sender email shows as myusername@mydomain.com but is now followed by "via tommy.heliohost.org". Is there a way to change this or is this as far as PHP can go codewise? I'm thinking that the mail client automatically appends the "via tommy.heliohost.org". If not, how should I proceed? Thanks again! Edited December 21, 2017 by studius
wolstech Posted December 21, 2017 Posted December 21, 2017 That's your mail client adding that as a security measure. Some clients do it, some don't. It usually appears when the rDNS of the sending server does not match the domain in the From header. Since you're on a shared server, the rDNS will resolve back to servername.heliohost.org. If you set the From as something@tommy.heliohost.org you wouldn't see that since the domains would match. Gmail is probably the most widely known one that does this. The idea behind it is to help users in scenarios where someone makes the From address something nefarious such as update-your-account@paypal.com, the via is there to make it easier for users to see it's phishing and did not actually come from PayPal. 1
Krydos Posted December 21, 2017 Posted December 21, 2017 If you would like we can sell you a dedicated IP for $12 for a year, and set up reverse dns on your ip back to your domain. Since you'd be the only domain on that IP address it would get rid of that message.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now