Jump to content

Sending Verification Email


akrohn

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/258802-sending-verification-email/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.