How to send Email using php script – mail function

Share on TwitterDigg This

Below script is simple email script in php. by using mail function

<?php 
// Email destination address
 $to = 'to@email.com'; 
// Email Subject
 $subject = 'PHP Simple Mailer Example'; 
// Email message 
$content = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
 Etiam sit amet elit vitae arcu interdum ullamcorper.'; 
// Additional headers
 
$headers  = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text; charset=iso-8859-1' . "\n"; 
$headers .= 'From: from@email.com';
 
 mail($to,$subject,$content,$headers); 
?>

Random

About prabin t p

Connect with me on Google+
This entry was posted in php and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

*