Skip to content

Instantly share code, notes, and snippets.

@FelisPhasma
Created March 7, 2015 17:34
Show Gist options
  • Save FelisPhasma/2a11a73512d4995d31b1 to your computer and use it in GitHub Desktop.
Save FelisPhasma/2a11a73512d4995d31b1 to your computer and use it in GitHub Desktop.
testing php's mail function
<?php
# http://learn.koding.com/guides/enable-php-mail-function/
$to = 'felisphasma@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@felisphasma.koding.io' . "\r\n" .
'Reply-To: webmaster@felisphasma.koding.io' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo "Mail sent";
@itsraghz
Copy link

itsraghz commented Mar 8, 2015

Hi, I had tried the same without the $headers. It worked fine. I will have to check with a custom head and try further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment