Sending Verification Email
Posted: Mon Mar 12, 2012 11:11 pm
I am trying to send an email to a person who registers on my site. I have two problems. First, here is the email script:
Problem 1: I tried this on two identical pages, index.php and register.php. For some reason it only works on the index.php page.
Problem 2: When it does work on the index.php page, the From header does not show noreply@website.com, it shows that it is from my host. How can I fix that?
Thanks.
Code: Select all
$message = "Thank you for registering.\n\n";
mail($email, 'Registration Confirmation', $message, 'From: noreply@website.com');
Problem 2: When it does work on the index.php page, the From header does not show noreply@website.com, it shows that it is from my host. How can I fix that?
Thanks.