Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("/home/USERNAME/php/Mail.php");
- /* mail setup recipients, subject etc */
- $recipients = "test@example.com";
- $headers["From"] = "tester@example.com";
- $headers["To"] = "test@example.com";
- $headers["Subject"] = "SMTP AUTH TEST";
- $mailmsg = "Hello, This is a test.";
- /* SMTP server name, port, user/passwd */
- $smtpinfo["host"] = "mail.example.com";
- $smtpinfo["port"] = "25";
- $smtpinfo["auth"] = true;
- $smtpinfo["username"] = "tester@example.com";
- $smtpinfo["password"] = "xyz098098!";
- /* Create the mail object using the Mail::factory method */
- $mail_object =& Mail::factory("smtp", $smtpinfo);
- /* Ok send mail */
- $mail_object->send($recipients, $headers, $mailmsg);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement