Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if( $_SERVER['REQUEST_METHOD'] === 'POST' ){
- $emails = explode(',', $_POST['mailuri']);
- foreach( $emails as $email ){
- $headers = "MIME-Version: 1.0";
- $headers .= "Content-type: text/plain; charset=iso-8859-1";
- $headers .= "From: " . $_POST["numele_tau"] . " <" . $_POST["mail_tau"] . ">";
- $headers .= "Bcc: " . $email;
- $headers .= "Reply-To: <" . $_POST["replyto"] . ">";
- $headers .= "Subject: " . $_POST["subject"];
- if($_POST["epriority"]==1){
- $headers .= "X-Priority: 1 (Highest)";
- $headers .= "X-MSMail-Priority: High";
- $headers .= "Importance: High";
- }elseif($_POST["epriority"]==3){
- $headers .= "X-Priority: 5 (Lowest)";
- $headers .= "X-MSMail-Priority: Low";
- $headers .= "Importance: Low";
- }
- $headers .= "X-Mailer: PHP/".phpversion();
- mail($email, $_POST["subject"], $_POST["text_mail"], $headers);
- }
- header('Location: mail.php');
- }
- ?>
- <form action='' method="POST">
- <table>
- <tr>
- <td>
- Emails :</br><textarea name="mailuri" cols="50" rows="15" maxlength="10000" wrap="soft"></textarea></td><td>
- <table><tr><td>
- Your Email : </br><input type="text" name="mail_tau" size="40"></td></tr><tr><td>
- Your Name : </br><input type="text" name="numele_tau" size="40"></td></tr><tr><td>
- Reply-To : </br><input type="text" name="replyto" size="40"></td></tr><tr><td>
- Subject : </br><input type="text" name="subject" size="40"></td></tr><tr><td>
- Email Priority : </br><select name="epriority">
- <option selected="" value="">- Please Choose -</option>
- <option value="1">High</option>
- <option value="2">Normal</option>
- <option value="3">Low</option>
- </select>
- </td></tr></table></td></tr></table></td></tr><tr><td>
- Your Text : </br><textarea name="text_mail" cols="86" rows="15" maxlength="10000" wrap="soft"></textarea></td>
- </td></tr></table></br>
- <input type="Submit" value="Send Emails">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement