Send an E-Mail in PHP 08-10-2015, 07:32 PM
#1
Have you always wanted to know how to send a email via php code? Well I'm about to tell you. This doesn't work on local host so if your trying this then you will need some hosting to test it out.
It's as simple as this.
Enjoy
It's as simple as this.
Code:
<?php
$to    = 'nobody@supremeforums.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@supremeforums.com' . "\r\n" .
  'Reply-To: webmaster@supremeforums.com' . "\r\n" .
  'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>Enjoy


![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)