Advertisement
GWibisono

Untitled

Nov 18th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     require_once("Mail.php");
  3.     require_once('Mail/mime.php');
  4. // ini mksdny apa?
  5.     $recipients =  "codalf@xxxxxx.com"; //penerima
  6. // dari (from)
  7.    $headers["From"] = 'atheris.hispida@gmail.com';
  8. // ini mksdny apa?
  9.   $headers["Return-Path"] = ''; //lupa...
  10. $crlf="\n";
  11.  // kepada (to)
  12.             $headers["To"] = "froza.elf@gmail.com";
  13.             $headers["Subject"] = "menerima order pemesanan"; //header
  14.             $pesan = "Bla Bla ZZZZZ"; // buat dalam bentuk
  15.     $mime = new Mail_mime($crlf);  
  16.                     $mime->setHTMLBody($pesan);
  17.                     $body = $mime->get();
  18.                     $header  = $mime->headers($headers);
  19.              
  20.             $smtpinfo["host"] =  "mail.xxxxxx.com"; //alamat server smtp
  21.             $smtpinfo["port"] = "25";
  22.             $smtpinfo["auth"] = true;
  23.             $smtpinfo["username"] = "codalf@xxxxxx.com"; //username server
  24.             $smtpinfo["password"] = "~!@#$%^&*()"; //password
  25.              
  26.             $mail_object =& Mail::factory("smtp", $smtpinfo);
  27.     $mail_object->send($recipients, $header, $body); //kirim email
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement