관리-도구
편집 파일: sendmail.php
<?php if(isset($_REQUEST['send_massage'])) { $field_name = $_POST['name']; $field_email = $_POST['email']; $field_phone = $_POST['phone']; $field_role = $_POST['role']; //admin text $mail_to='admission@mithila-art.com,,nationalinstituteofmithilaart@gmail.com'; $subject = 'Message from ' . $field_name; $body_message = ' <html> <head> <title>Welcome To National Institute Of Mithila Art</title> </head> <body> <h1 style="color:blue; text-align: center;">Query</h1> <table cellspacing="0" style="border: 2px dashed #FB4314; width: 100%;"> <tr> <th>Name:</th><td>'.$field_name.'</td> </tr> <tr style="background-color: #e0e0e0;"> <th>Email:</th><td>'.$field_email.'</td> </tr> <tr> <th>Phone:</th><td>'.$field_phone.'</td> </tr> <tr> <tr style="background-color: #e0e0e0;"> <th>Massage:</th><td>'.$field_role.'</td> </tr> </table> </body> </html>'; //to user $headers = "From: $field_email\r\n"; $headers .= "Reply-To: $field_email\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); //send a response copy to sender email if ($mail_status) { $mail_to = $field_email; $subject = 'Mihila Art ( Admission Enquiry Reply ) '; $body_message = ' <head> <title>paste your title</title> </head> <body style="background: #e6e6e657!important;color: #000;padding: 25px;font-family: lato;"> <h1 style="color:blue; text-align: center;">National Institute Of Mithila Art </h1> <div style="margin-left:10%"> <p>Thanks <b>'.$field_name.'; </b> Thank you for writing to us. We have received your message and will get back to you within 24 hours. Until then, you can give us a call anytime at +91 7004562630 or email <a href="mailto:admission@mithila-art.com" target="_blank">admission@mithila-art.com</a>. National Institute Of Mithila Art Know More go to website <a href="http://mithila-art.com/" target="_blank" data-saferedirecturl="http://mithila-art.com">mithila-art.com/</a></p></div> </body> </html> '; $headers = "From: admission@mithila-art.com\r\n"; $headers .= "Reply-To: '.$field_email.'\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $status = mail($mail_to, $subject, $body_message, $headers); if ($status) { ?> <script language="javascript" type="text/javascript"> alert('Thank you for the message. We will contact you shortly.We will send a copy to your email. thanks again!'); window.location = '../index.html'; </script> <?php } } } ?>