Contact Form – Send Confirmation Email to Customer

Home Forums Porto – Responsive HTML5 Template Contact Form – Send Confirmation Email to Customer

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10043223
    Boilerbop
    Participant

    Hi,

    The form is working well, but I would like to send the customer an automated response confirming that we received their message. How do I set that up?

    Thanks.


    #10043227
    Support
    Keymaster

    Hi, this is a similar topic:

    E-mail auto reply

    Hope that helps.

    Kind Regards.


    #10043238
    Boilerbop
    Participant

    Hi. I added the code and but I keep getting an error saying the form could not submit. I can’t leave the new code live on my site, because clients won’t be able to use it.

    However, here’s the code I added:

    // Thank You mail
    $mail->AddAddress($_POST[’email’]);
    $mail->SetFrom($email, ‘www.videomvp.com’);
    $mail->IsHTML(true);
    $mail->CharSet = ‘UTF-8’;
    $mail->Subject = ‘Thank You’;
    $mail->Body = ‘Thank you for contacting Video MVP. We will reply as soon as possible.’;
    $mail->Send();

    Also, how do I change $mail->Subject = ‘Thank You’; to have it be the subject of the email they sent to me. Is it $mail->Subject($_POST[‘subject’]);

    Thanks.


    #10043241
    Support
    Keymaster

    Hello,

    Make sure you add it this way between line 94 and 95, just after the first “$mail->Send();”

    // Thank You mail
    $mail->AddAddress($_POST['email']);
    $mail->SetFrom($email, 'Video MVP');
    $mail->IsHTML(true);
    $mail->CharSet = 'UTF-8';
    $mail->Subject = $subject;
    $mail->Body    = 'Thank You Message';
    $mail->Send();

    #10043242
    Boilerbop
    Participant

    Works great! How do I add line breaks so the Thank You Message can be in multiple lines with blank lines in between?

    Message Line 1

    Message Line 2

    Message Line 3


    #10043244
    Support
    Keymaster
    #10043245
    Boilerbop
    Participant

    Thanks. I read that page and tried several variations of \n and \r but all of them keep giving me an error on send.

    This is what I tried last:

    $mail->Body = ‘Thanks for contacting Video MVP!’ “\n” ‘We make every effort to reply to messages as soon as possible, even outside of normal business hours (8:30 to 5:30, M-F).’ “\n” ‘In the meantime, you can see all our services here: https://www.videomvp.com/services’ “\n” ‘The Video MVP Team’;


    #10043253
    Support
    Keymaster

    Hello, that’s strange.

    Let’s try using HTML, so using:

    <p>Text...</p><p>Text...</p>

    Or

    Text...<br>Text...

    Let me know if it works.

    It actually depends on the server to be able to do that and also the email receiver.

    Kind Regards.


Viewing 8 posts - 1 through 8 (of 8 total)

This topic is marked as "RESOLVED" and can not rceive new replies.