Jump to content

Archived

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

bilis_money

Header mail() question? is this correct?

Recommended Posts

hi, guys

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

[code]
//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);
[/code]

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.

Share this post


Link to post
Share on other sites
mail($recepient, $subject, $contents, "From: Website Admin. :)", $headers);

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

Thats wat it shud be

Share this post


Link to post
Share on other sites

×

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.