Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once "Mail.php";
- $from = "xxx Support <noreply@xxxx.com>";
- $to = "$name <$email>";
- $subject = "xxxxx";
- $body = "xxx";
- $host = "mail.xxx.com";
- $username = "noreply+xxx.com";
- $password = "xzcsd=sfd?hdssc";
- $headers = array ('From' => $from,
- 'To' => $to,
- 'Subject' => $subject);
- $smtp = Mail::factory('smtp',
- array ('host' => $host,
- 'auth' => true,
- 'username' => $username,
- 'password' => $password));
- $mail = $smtp->send($to, $headers, $body);
- if (PEAR::isError($mail)) {
- echo("<p>" . $mail->getMessage() . "</p>");
- }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement