daveoffy Posted November 16, 2008 Share Posted November 16, 2008 I want it so when someone registers it sends them an auto email. I want it to send it to $email. I searched Google and couldn't find anything. If you could find me a site or just write a snippet of code I can get it to work. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/132948-auto-send-e-mail/ Share on other sites More sharing options...
gevans Posted November 16, 2008 Share Posted November 16, 2008 http://fr2.php.net/manual/en/function.mail.php That's the link to the main function page at php.net Should be everything you need. If you have any problems just ask Link to comment https://forums.phpfreaks.com/topic/132948-auto-send-e-mail/#findComment-691353 Share on other sites More sharing options...
redarrow Posted November 16, 2008 Share Posted November 16, 2008 Here you go mate add it to the end off the last correct condition so thay get a email ok........ <?php $FullName = Trim(stripslashes($_POST['full_name'])); $Email = Trim(stripslashes($_POST['email'])); $Message = Trim(stripslashes($_POST['message'])); $to = $email; $subject = 'Testing mail!'; $mes = "Hello; \n\n You have recieved an email from "; $mes .= "you website's contact form. The message is below for your convenience. \n\n ****************************** \nFull Name: "; $mes .= $full_name; $mes .= "\n"; $mes .= "Email: "; $mes .= $Email; $mes .= "\n"; $mes .= "Message: "; $mes .= $Message; $mes .= "\n ****************************** \n\n This Is An Automatically Generated Message, Do Not Repond!"; $message = $mes; $headers = 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; // Send mail($to, $subject, $message, $headers); ?> Link to comment https://forums.phpfreaks.com/topic/132948-auto-send-e-mail/#findComment-691370 Share on other sites More sharing options...
PFMaBiSmAd Posted November 16, 2008 Share Posted November 16, 2008 Sending an auto reply email to any email address that is entered in a form is dumb as it will allow the bot scripts that visit your site to at a minimum send nuisance emails to all the email addresses they hit your form processing code with, possibly getting your mail server banned by the major ISP's and placed on the spam databases. A visitor is already on your site with his browser open when he registered. Just display a thankyou page when the registration process is complete. Link to comment https://forums.phpfreaks.com/topic/132948-auto-send-e-mail/#findComment-691378 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.