Skip to content

Instantly share code, notes, and snippets.

@sarthology
Created December 29, 2013 20:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sarthology/8174322 to your computer and use it in GitHub Desktop.
Its the proper way how to send a mail that will not be a span at all. all you have to do is use Name@Site.com like Contact@sarthak.com problem solved
<?php
$to = 'yourMail1@gmail.com' . ', ';
$to .= 'yourMail2@gmail.com';
$subject = 'The vowers';
$message = $_POST['comments']. "<".$_POST['email'].">";
$headers = 'From: contact@thevowers.com';
$headers = htmlspecialchars($headers);
$message = htmlspecialchars($message);
$mail= mail($to, $subject, $message, $headers);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment