PHP Mail function Print

  • 66

<?php
$to = "info@securehost.ie";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "info@secureweb.ie";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers,"-finfo@secureweb.ie");
echo "Mail Sent.\n\r";
?>

The -f option will force the return path in the header.


Was this answer helpful?

« Back