Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created August 25, 2019 19:48
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 walterdavis/c2a454a5bbdf3a90564ca52c351705b9 to your computer and use it in GitHub Desktop.
Save walterdavis/c2a454a5bbdf3a90564ca52c351705b9 to your computer and use it in GitHub Desktop.
<?php
header('Content-type: text/plain');
error_reporting(E_ALL);
ini_set('display_errors', true);
$from = 'you@yourdomain.com';
$to = 'you@yourdomain.com';
if(mail($to, 'test message from PHP', phpinfo(), array("From: $from"), "-f$from")){
print('Mail sent successfully');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment