Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created April 22, 2014 12:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
PHP mail sending test script
<?php
$sender_1 = 'a_real_user@your_server.com';
$sender_2 = 'a_real_user@a_different_server.com';
$recipient = 'you@your_email_server.com';
print 'Sending mail...';
mail($recipient, 'A test message', 'Sent by a local user', "From: $sender_1", "-f$sender_1");
mail($recipient, 'A test message', 'Sent by a remote user', "From: $sender_2", "-f$sender_2");
print 'Done!';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment