SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | require_once("Mail.php"); | |
3 | - | require_once('Mail/mime.php'); |
3 | + | require_once('Mail/mime.php'); |
4 | // ini mksdny apa? | |
5 | - | $recipients = "[email protected]"; |
5 | + | $recipients = "[email protected]"; //penerima |
6 | // dari (from) | |
7 | - | $headers["From"] = '[email protected]'; |
7 | + | $headers["From"] = '[email protected]'; |
8 | - | |
8 | + | |
9 | $headers["Return-Path"] = ''; //lupa... | |
10 | - | $headers["Return-Path"] = ''; |
10 | + | $crlf="\n"; |
11 | // kepada (to) | |
12 | $headers["To"] = "[email protected]"; | |
13 | - | $headers["Subject"] = "menerima order pemesanan"; |
13 | + | $headers["Subject"] = "menerima order pemesanan"; //header |
14 | - | $pesan = "Bla Bla ZZZZZ"; |
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"; |
20 | + | $smtpinfo["host"] = "mail.xxxxxx.com"; //alamat server smtp |
21 | $smtpinfo["port"] = "25"; | |
22 | $smtpinfo["auth"] = true; | |
23 | - | $smtpinfo["username"] = "[email protected]"; |
23 | + | $smtpinfo["username"] = "[email protected]"; //username server |
24 | - | $smtpinfo["password"] = "~!@#$%^&*()"; |
24 | + | $smtpinfo["password"] = "~!@#$%^&*()"; //password |
25 | ||
26 | $mail_object =& Mail::factory("smtp", $smtpinfo); | |
27 | - | $mail_object->send($recipients, $header, $body); |
27 | + | $mail_object->send($recipients, $header, $body); //kirim email |
28 | ?> |