[Solved] Auto email responding


You need to append below code at bottom to send email to the sender as well.

// Email to Sender (Without HTML/CSS)

$sender_email = $email;
$admin_email="[email protected]";

$message = "Thanks for your interest".$name."\n\n";

$message .= "This is just a quick note to let you know we have received your 
form and will respond as soon as we can.\n\n";

$message .= "Best,\n\n";
$message .= "Marvin\n\n";

mb_language("Japanese");
mb_internal_encoding("UTF-8");
$success2 = mb_send_mail($sender_email, 'Thanks', $message, 'From: 
<'.$admin_email.'>');


// Email to Sender (With HTML/CSS)

$sender_email = $email;
$admin_email="[email protected]";

$header = "From: ".$admin_email." \n";
$header.= "Content-Type: text/html; charset=iso-8859-1\n";

$message="<html>
    <head>
        <style type="text/css">
            <!--
                .style2 {
                font-size: 11px;
                font-weight: bold;
                text-decoration: none;
                font-family: Verdana, Arial, Helvetica, sans-serif;
                color:#666666;

                }
                .style3 {
                text-decoration: none;
                font-family: Verdana, Arial, Helvetica, sans-serif;
                font-size: 11px;
                color:#666666;
                }
                -->
        </style>
    </head>
    <body>
        <table width="600" border="0" align="center" style="border:#EFEFEF 
5px solid; padding:5px; font-family:Arial, Helvetica, sans-serif; font-
size:11px; color:#666666">
            <tr>
                <td>
                    <table width="100%" border="0" cellpadding="2" 
cellspacing="6">
                        <tr>
                            <td class="style3">Thanks for your interest 
".$name.'</td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style3">This is just a quick note to 
let you know we have received your 
form and will respond as soon as we can.</td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style3">Best,<br>
                                Marvin
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>';

mb_language("Japanese");
mb_internal_encoding("UTF-8");
$success2 = mb_send_mail($sender_email, 'Thanks', $message, $header);

Hope it helps!

7

solved Auto email responding