Jump to content

[SOLVED] php - send mail to me


RyanSF07

Recommended Posts

Hi Guys,

 

I'm using this bit of "send me an email" code in a different part of the site and it works great.

 

So, I pasted it after this insert query (see below) so as to learn when a "new member" has registered, but when I test it, I'm not receiving mail -- even checked the Bulk folder.

 

What do I need to change to make this work?

 


$_POST[password] = md5($_POST[password]);

if ($a AND $b AND $c) { //if required is true

	// do insert here
			$query = "INSERT INTO registered_users VALUES 
			('0', '$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]',
			'$_POST[email]', '$_POST[password]', '$_POST[link]', NOW())";	

			if (mysql_query($query)) { 

                                //send me an email

		$recep = "[email protected]";
		$subject = "New Member";
		$text = "'$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]',
			'$_POST[email]', '$_POST[link]',";
		$headers =
		"X-Mailer: PHP\n" .
		"Reply-to: [email protected]\n";
		mail($recep,$subject,$text,$headers);

$content .= "<H2>Thank you, $_POST[user_name], for registering.</H2>
<p>etc etc etc</p>
<br>";
}

 

Thank you for your help!

Ryan

Link to comment
https://forums.phpfreaks.com/topic/59884-solved-php-send-mail-to-me/
Share on other sites

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.