Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- alternatif selain mail. sy taro di helper
- */
- require_once("Mail.php");
- require_once('Mail/mime.php');
- $recipients = $a['to'];
- $headers["From"] = $a['from'];
- $headers["Return-Path"] = $a['from'];
- $headers["To"] = $a['to'];
- $headers["Subject"] = $a['subject'];
- $crlf = "\n";
- $mailmsg=$a['msg'];
- $mime = new Mail_mime($crlf);
- $mime->setHTMLBody($mailmsg);
- $body = $mime->get();
- $header = $mime->headers($headers);
- //"174.136.35.84";
- $smtpinfo["host"] = "mail.xxx.com";
- $smtpinfo["port"] = "25";
- $smtpinfo["auth"] = true;
- $smtpinfo["username"] = "cs@xxxx.com";
- $smtpinfo["password"] = "xxxxxx";
- $mail_object =& Mail::factory("smtp", $smtpinfo);
- $mail_object->send($recipients, $header, $body);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement