Advertisement
Guest User

Untitled

a guest
Sep 12th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. include("/home/USERNAME/php/Mail.php");
  3.  
  4. /* mail setup recipients, subject etc */
  5. $recipients = "test@example.com";
  6. $headers["From"] = "tester@example.com";
  7. $headers["To"] = "test@example.com";
  8. $headers["Subject"] = "SMTP AUTH TEST";
  9. $mailmsg = "Hello, This is a test.";
  10.  
  11. /* SMTP server name, port, user/passwd */
  12. $smtpinfo["host"] = "mail.example.com";
  13. $smtpinfo["port"] = "25";
  14. $smtpinfo["auth"] = true;
  15. $smtpinfo["username"] = "tester@example.com";
  16. $smtpinfo["password"] = "xyz098098!";
  17.  
  18. /* Create the mail object using the Mail::factory method */
  19. $mail_object =& Mail::factory("smtp", $smtpinfo);
  20.  
  21. /* Ok send mail */
  22. $mail_object->send($recipients, $headers, $mailmsg);
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement