Could anyone help me add smtp and auto-reply to this?

    $name = $_POST['name'];
    $email = $_POST['email'];
    $message = $_POST['message'];
    $from = 'From: Website Message'; 
    $to = ''; 
    $subject = 'Message from your Website';
    $body = "From: $name\n E-Mail: $email\n Message:\n $message";
    if ($_POST['submit']) {				 
        if (mail ($to, $subject, $body, $from)) { 
	    echo '';



Not sure what you mean by adding SMTP and auto-reply.

This is the PHP mail() function. If you want to use SMTP instead you need to use something like PHPMailer, and autoreply is something you would add in your mail system.

Yes, I want to use SMTP instead. Sorry I am not a coder or webdesigner… Not sure about the terms

Not sure what you mean by adding in your mail system… I thought the the auto-reply would be triggered through the submit function…?


You can get PHPMailer here.

Maybe I’m not understanding what you mean by an auto-reply. The mail() function - or PHPMailer will send an email to your intended recipient. Where does the auto-reply come in?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.