Tuesday, October 6, 2009

mail with headers

without headers

<?php echo "Mail send status = ".(mail(';toemail2@gmail.com', 'My Subject', "TEST"));?>

with headers test

<?php

  $to = "toemail@gmail.com";

  $subject = "My test";

  $txt = "Hello world!";

  $headers = "From:Sender name <fromemail@gmail.com>" . "\r\n" .

  "To:Toemail2 Name <toemail2@gmail.com>";

echo "Mail send status = ".mail($to,$subject,$txt,$headers);

  ?>

No comments:

Post a Comment