pop3_before_smtp_test.php
Go to the documentation of this file.00001 <html>
00002 <head>
00003 <title>POP before SMTP Test</title>
00004 </head>
00005
00006 <body>
00007
00008 <pre>
00009 <?php
00010 require 'class.phpmailer.php';
00011 require 'class.pop3.php';
00012
00013 $pop = new POP3();
00014 $pop->Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);
00015
00016 $mail = new PHPMailer();
00017
00018 $mail->IsSMTP();
00019 $mail->SMTPDebug = 2;
00020 $mail->IsHTML(false);
00021
00022 $mail->Host = 'relay.example.com';
00023
00024 $mail->From = 'mailer@example.com';
00025 $mail->FromName = 'Example Mailer';
00026
00027 $mail->Subject = 'My subject';
00028 $mail->Body = 'Hello world';
00029 $mail->AddAddress('name@anydomain.com', 'First Last');
00030
00031 if (!$mail->Send())
00032 {
00033 echo $mail->ErrorInfo;
00034 }
00035 ?>
00036 </pre>
00037
00038 </body>
00039 </html>