Skip to content

Instantly share code, notes, and snippets.

@asathoor
Created December 8, 2015 15:30
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 asathoor/2a0b5bf6c6ef5ce80fd9 to your computer and use it in GitHub Desktop.
Save asathoor/2a0b5bf6c6ef5ce80fd9 to your computer and use it in GitHub Desktop.
PHP mail() on one.com (from their online chat help forum)
<?php
$to = 'mail@domain.com';
$subject = 'subject';
$message = 'hello';
$headers = 'From: mail@domain.com' . "\r\n" .
'Reply-To: mail@domain.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
'Date: ' . date('r', $_SERVER['REQUEST_TIME']);
mail($to, $subject, $message, $headers);
if (mail)
{
echo"success";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment