Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $email = str_replace("href="",'',$_POST['element_5_list']);
- $email2 = str_replace('"','',$email);
- $email3 =str_replace("\",'',$email2);
- $name = $_POST['element_0_name'];
- $email = str_replace(' ','',$_POST['element_1_email']);
- $company = $_POST['element_2_company'];
- $date = $_POST['element_3_date'];
- $comment = $_POST['element_4_comment'];
- $list = $_POST['element_5_list'];
- $mails = array();
- foreach($_POST['rep'] as $rep_num) {
- if($rep_num == 02) {$rep_num = 'a@website.com';}
- if($rep_num == 03) {$rep_num = 'b@website.com';}
- if($rep_num == 04) {$rep_num = 'c@website.com';}
- $mails[] = $rep_num;
- }
- $email_to = implode(',', $mails);
- $email_subject = "Website Wishlist Form";
- $email_message = "nn";
- function clean_string($string) {
- $bad = array ("content-type", "bcc:", "to:", "cc:", "href");
- return str_replace($bad, "",$string);
- }
- $email_message .= '<div style="font-family:Arial, Helvetica, sans-serif;padding-left: 90px;font-weight: 100;font-size: 14px;color: #2a2a2a;"><table width="800px" height="730px;"border="0" cellspacing="10" background="http://www.website.com//email_bg2.jpg">
- <tr>
- <td style="vertical-align:top;padding-left:88px;">
- <h2 style="padding-top:30px;padding-left:90px;"> Wishlist Order</h2><p>Someone will respond to you shortly.</p><br>';
- $email_message .= '<p style="max-width:750px;">Name: '. $name .'<br /></p>';
- $email_message .= "<p style="max-width:750px;">Email: " .clean_string($email) . "<br></p>";
- $email_message .= "<p style="max-width:750px;">Company: " .$company. "<br></p>";
- $email_message .= "<p style="max-width:750px;">Date Required: " .$date. "<br></p>";
- $email_message .= "<p style="max-width:750px;">Comment: " .$comment. "</span><br><br></p>";
- $email_message .= '<u>Items on Wishlist:</u><style>tr:nth-child(2n) </style> </u><br>'.$email3. '</table>';
- $email_message .= "</div>";
- $headers = 'From: '. $name. " rn".$headers .= "MIME-Version:1.0rn";
- $headers .= "Content-Type: text/html; charset=utf-8; rn";
- $add = "-f donotreply@website.com";
- 'X-Mailer: PHP/' .phpversion();
- mail($email_to, $email_subject, $email_message, $headers, $add);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement