Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

mail()function

Contributor ,
Apr 09, 2007 Apr 09, 2007
hey guys, i have this registration script, when users register, it sends an email with activation link to their email address, but it shows email from the host company, not my webmaster email address. Can i place a mail() function for it???
Where would i place it?
Here is my registration code:


// Send the email.
LINE 66 -> $body = "Thank you for registering at the Therainbowpride.com. To activate your account, please click on this link:\n\n";
LINE 67 -> $body .= " http://www.therainbowpride.com/activate.php?x=" . mysql_insert_id() . "&y=$a";
LINE 68 -> mail($_POST['email'], 'Registration Confirmation', $body);

Thank you guys
TOPICS
Server side applications
375
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2007 Apr 09, 2007
can someone help me please?
thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 09, 2007 Apr 09, 2007
On Mon, 9 Apr 2007 22:09:48 +0000 (UTC), "LuisDesigns"
<webforumsuser@macromedia.com> wrote:

> mail($_POST['email'], 'Registration Confirmation', $body);

Add this to your code (change it to your details/email address!!):

$header = "From: Rainbow Pride Registration <myemail@myaddress.com>";

and then change the quoted line (above) to this:

mail($_POST['email'], 'Registration Confirmation', $body, $header);
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2007 Apr 09, 2007
do i add this :
$header = "From: Rainbow Pride Registration <myemail@myaddress.com>";
to the header.html ?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 10, 2007 Apr 10, 2007
On Tue, 10 Apr 2007 01:42:12 +0000 (UTC), "LuisDesigns"
<webforumsuser@macromedia.com> wrote:

>do i add this :
>$header = "From: Rainbow Pride Registration <myemail@myaddress.com>";
>to the header.html ?

No, before the mail function that I gave you. And change the line
above to one that has your email address!

You really should look at the examples on the PHP website - it is a
great resource:

http://hk2.php.net/manual/en/function.mail.php
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 11, 2007 Apr 11, 2007
LATEST
Thank you Steve, the code u gave me worked fine. I added the link to my favs 🙂 txs again
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines