Jump to content

Auto Send E-Mail


daveoffy

Recommended Posts

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

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

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.