1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<!-- Email Spoofer v0.0.1 | MIT License | github.com/ShubhamBadal/email-spoofer --> <!doctype html> <html> <head> <title>Direct Mailer</title> </head> <body> <?php /* CONFIGURE PHP IF NEEDED */ // ini_set("sendmail_from","$fromFull"); // ini_set("SMTP","mail.smtp2go.com"); // ini_set('smtp_port',2525); // ini_set('username',"snake"); // ini_set('password',"cobra"); // COMPOSE $to = 'angelina@jolie.com'; $subject = 'Hey, I am sorry.'; $message = 'I want to meet you!'; // BASIC HEADER $headers = 'From: brad@pitt.com' . "\r\n" . 'Reply-To: brad@pitt.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // SEND AND SHOW MESSAGE if (mail($to, $subject, $message, $headers)) echo $headers.'<h1>Mail sent!</h1>'; else echo '<h1>Something went wrong...</h1>'; // FULL HEADER // $headers = "From: testsite < mail@testsite.com >\n"; // $headers .= "Cc: testsite < mail@testsite.com >\n"; // $headers .= "X-Sender: testsite < mail@testsite.com >\n"; // $headers .= 'X-Mailer: PHP/' . phpversion(); // $headers .= "X-Priority: 1\n"; // $headers .= "Return-Path: mail@testsite.com\n"; // $headers .= "MIME-Version: 1.0\r\n"; // $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; ?> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
<!-- Email Spoofer v0.0.1 | MIT License | github.com/ShubhamBadal/email-spoofer --> <!doctype html> <html> <head> <title>Form Mailer</title> </head> <body> <?php /* FETCH FROM HTML */ $fromName=$_POST['fromname']; $fromEmail=$_POST['fromemail']; $replytoName=$_POST['replytoname']; $replytoEmail=$_POST['replytoemail']; $toEmail=$_POST['to']; $subjectText=$_POST['subject']; $messageText=$_POST['message']; // CREATE FULL FIELDS (NAME + EMAIL) $fromFull = $fromName . ' <'.$fromEmail.'> '; $replytoFull = $replytoName . ' <'.$replytoEmail.'> '; /* CONFIGURE PHP IF NEEDED */ // ini_set("sendmail_from","$fromFull"); // ini_set("SMTP","mail.smtp2go.com"); // ini_set('smtp_port',2525); // ini_set('username',"snake"); // ini_set('password',"cobra"); // COMPOSE $to = $toEmail; $subject = $subjectText; $message = $messageText; // BASIC HEADER // $headers = 'From: '.$fromFull . "\r\n" . // 'Reply-To: '.$replytoFull . "\r\n" . // 'X-Mailer: PHP/' . phpversion(); // FULL HEADER $headers = "From: ".$fromFull . "\r\n"; $headers .= "Reply-To: ".$replytoFull . "\r\n"; // $headers .= "To: Mary <mary@example.com>, Kelly <kelly@example.com>" . "\r\n"; // $headers .= "Cc: sendacopy@here.com" . "\r\n"; // $headers .= "Bcc: sendablindcopy@here.com" . "\r\n"; // $headers .= "X-Sender: testsite < mail@testsite.com >" . "\r\n"; // $headers .= "Return-Path: " . $fromFull . "\r\n"; // $headers .= "Content-Type: text/html; charset=ISO-8859-1" . "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $headers .= "X-Priority: 1" . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; // SEND AND SHOW MESSAGE if (mail($to, $subject, $message, $headers)) echo $headers.'<h1>Mail sent!</h1>'; else echo '<h1>Something went wrong...</h1>'; // DEBUGGING MODE // echo $fromFull; // echo $replytoFull; // echo $header; // REDIRECT TO PREVIOUS PAGE AFTER SENDING // header('Location: ' . $_SERVER['HTTP_REFERER']); ?> </body> </html> |