akrohn Posted March 13, 2012 Share Posted March 13, 2012 I am sending a email verification that a person registers on my site. I have two problems. Here is the email script: $message = "Thank you for registering."; mail($email, 'Registration Confirmation', $message, 'From: [email protected]'); Problem 1: I have tried this on two different identical pages, index.php and register.php. It only works in the index page. Problem 2: When it does work on the index page, the From header does not show what is in the mail() function, it shows that it is from my host. What's up with that? Given the choice, I need to get problem 2 solved way more than problem 1. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/258802-sending-verification-email/ Share on other sites More sharing options...
scootstah Posted March 13, 2012 Share Posted March 13, 2012 1. You're going to need to give more code. With the code you have, there's no explanation why it would work in one file and not the other. The issue lies in other code on the page. 2. You may try the Sender header or the envelope-sender command line parameter. Quote Link to comment https://forums.phpfreaks.com/topic/258802-sending-verification-email/#findComment-1326692 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.