Skip to content

Instantly share code, notes, and snippets.

@dharma017
Last active November 27, 2015 06:14
Show Gist options
  • Save dharma017/4251510 to your computer and use it in GitHub Desktop.
Save dharma017/4251510 to your computer and use it in GitHub Desktop.
PHP: Test Mail
<?php
$to = 'to@mail.com';
$subject = 'the subject';
$message = 'hello\r\n';
$message .= 'world\r\n';
$headers = 'From: from@mail.com' . "\r\n" .
'Reply-To: replyto@mail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment