Send Email With PHP From Some Other Address
Posted by Syberplanet on January 15th, 2009 - 473 views

This script just adds another functionality to the PHP Mail script that was posted earlier. The following script will add a send from option to the mail script and will allow the user to add his/her Name, E-mail Address in the headers.
<?php
$Name = "Syber Blog"; //senders name
$email = "info@syberplanet.net"; //senders e-mail address
$recipient = "someone@email.com"; //recipient
$mail_body = "Syberplanet.net - Games, Hacks, News and more..."; //body
$subject = "Check Out Syberplanet"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command
?>
If you enjoyed this post, make sure you subscribe to our RSS feed!




on March 15th, 2009
Every time i come here I am not dissapointed, nice post
on March 15th, 2009
Thanks a lot.
on March 22nd, 2009
Does anyone else have any experience with this?
on March 25th, 2009
I really enjoyed reading this page…Thanks for this
on April 2nd, 2009
I wanted to comment and thank the author, good stuff
on April 2nd, 2009
Well said, finally a good report on this stuff
on September 1st, 2009
Great articles & Nice a site