GWibisono

email .. inibayiku

Oct 28th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. <?php
  2.      require_once("Mail.php");
  3.      require_once('Mail/mime.php');
  4.      
  5.     $recipients =  $ar['to'];
  6.     $headers["From"] = $ar['from'];
  7.     $headers["Return-Path"] = $ar['from'];
  8.     $headers["To"] = $ar['to'];
  9.     $headers["Subject"] = $ar['title'];
  10.     $crlf = "\n";  
  11.     $mailmsg=$ar['contents'];
  12.         $mime = new Mail_mime($crlf);  
  13.         $mime->setHTMLBody($mailmsg);
  14.         $body = $mime->get();
  15.         $header  = $mime->headers($headers);
  16.      
  17.     $smtpinfo["host"] =  "mail.inibayiku.com";
  18.     $smtpinfo["port"] = "25";
  19.     $smtpinfo["auth"] = true;
  20.     $smtpinfo["username"] = "[email protected]";
  21.     $smtpinfo["password"] = "inibayiku";
  22.      
  23.     $mail_object =& Mail::factory("smtp", $smtpinfo);  
  24.     $mail_object->send($recipients, $header, $body);
Advertisement
Add Comment
Please, Sign In to add comment