Sending a Simple email using PHP


/ Published in: PHP
Save to your folder(s)

nothing special :)


Copy this code and paste it in your HTML
  1. function send_email($from,$to,$subject,$message){
  2. $header="From: <".$from.">
  3. ";
  4. $header.= 'MIME-Version: 1.0' . "
  5. ";
  6. $header.= 'Content-type: text/html; charset=iso-8859-1' . "
  7. ";
  8. $send_mail=mail($to,$subject,$message,$header);
  9. if(!$send_mail){ echo "ERROR"; }
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.