Pages

Thursday, November 18, 2010

How to send email through php

It is easy to send emails to any email provider with php using the simple codes below with smtp server
Web server, PHP, MySQL package(xampp) can be downloaded from this link Click Here.
Free smtp server can be downloaded from this link Click Here

<?php


$to     = "recipient@example.com";
$subject  = "Hi";

$content  = "I can send my emails through my computer";

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: you@yourwebsite.com' . "\r\n";

mail($to,$subject,$content,$headers);

?>

If you have any questions, feel free to post your questions here.

2 comments:

  1. Hi Balaji sir i want Multiple image upload

    ReplyDelete
  2. Hi anbu,

    I will create code snippet for you in my next post

    Thanks

    ReplyDelete