Posted by : Safras Ahamed Sunday, March 24, 2013

I started to make and collect my own function since 2001 and SafSendMail I made it in 2002 for a project where there was lots of mail sending option. If I want to send a mail I have to write whole lot and I didn't like it. Created SafSendMail so that I can send mail as I want using a single line.

Later I made SafSendMailV2 supporting HTML and other stuff as you can see, if any mail sent using V2 it will also record From-IP & From-File. Using this you can Identify different things.

function SafSendMailV2(
 if ($MYHTML==true) {
  $MYHEADERS .= "MIME-Version: 1.0\r\n";
  $MYHEADERS .= "Content-Type: text/html; charset=windows-1256\r\n";
  $MYHEADERS .= "Content-Transfer-Encoding: base64\r\n";
  $MYHEADERS .= "From-IP: $REMOTE_ADDR\r\n";
  $MYHEADERS .= "From-File: $PHP_SELF\r\n";
  $MYHEADERS .= chunk_split(base64_encode("$MYBODY"));
  $MYHEADERS .= "From-IP: $REMOTE_ADDR\r\n";
  $MYHEADERS .= "From-File: $PHP_SELF";

How to use?
SafSendMailV2("","Recipiente Name","Your Name","Your Email","Subject",$MYBODY,true,$REMOTE_ADDR,$PHP_SELF)

{ 2 comments... read them below or Comment }

  1. Great work Guys. Very helpful posts

    1. Shiran, Thank you for your comment,
      It made me feel "Thawa Daanna!"
      So I will post more and more


Popular Post

Blogger templates


- Copyright © My Code Genius by 2 Geniuses -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -