Jump to content


Header mail() question? is this correct?

  • Please log in to reply
1 reply to this topic

#1 bilis_money

  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 06 August 2006 - 05:55 AM

hi, guys

i would like to send email message into new registered user,
Is this snippet codes correct specially the Header?

//send message to new user.
$recepient = $email_new;
$subject = "Please activate your membership now!";
$contents = "Hi, $user_new  PLease activate now";
$headers = "Reply-to: $email_new";
mail($recepient, $subject, $contents, "From: Website Admin. :)", $headers);

i'm inserting $email_new inside a $headers because i want it to be dynamic,
I want to insert the email address of the new user into that, is that
correct insertion? i mean the codes?

and also i notice that when i press the send i don't recieve the message
from this codes, please help me i'm really stumped.

Thank you very much in advance.

#2 Chetan

  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 06 August 2006 - 06:04 AM

mail($recepient, $subject, $contents, "From: Website Admin. :)", $headers);

mail($recepient, $subject, $contents, "From: Website Admin. :) <admin@site.com>".$headers);

Thats wat it shud be
I am a PHP Guru, ask me questions if you want to

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users