Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created August 25, 2019 19:48
Show Gist options
  • 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 = '[email protected]';
$to = '[email protected]';
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