]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/third_party/php_mailer/examples/pop3_before_smtp_test.php
Code syncronized with shipsimu code base
[mailer.git] / inc / classes / third_party / php_mailer / examples / pop3_before_smtp_test.php
diff --git a/inc/classes/third_party/php_mailer/examples/pop3_before_smtp_test.php b/inc/classes/third_party/php_mailer/examples/pop3_before_smtp_test.php
new file mode 100644 (file)
index 0000000..794b2a2
--- /dev/null
@@ -0,0 +1,39 @@
+<html>\r
+<head>\r
+<title>POP before SMTP Test</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<pre>\r
+<?php\r
+  require 'class.phpmailer.php';\r
+  require 'class.pop3.php';\r
+\r
+  $pop = new POP3();\r
+  $pop->Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);\r
+\r
+  $mail = new PHPMailer();\r
+\r
+  $mail->IsSMTP();\r
+  $mail->SMTPDebug = 2;\r
+  $mail->IsHTML(false);\r
+\r
+  $mail->Host     = 'relay.example.com';\r
+\r
+  $mail->From     = 'mailer@example.com';\r
+  $mail->FromName = 'Example Mailer';\r
+\r
+  $mail->Subject  =  'My subject';\r
+  $mail->Body     =  'Hello world';\r
+  $mail->AddAddress('name@anydomain.com', 'First Last');\r
+\r
+  if (!$mail->Send())\r
+  {\r
+    echo $mail->ErrorInfo;\r
+  }\r
+?>\r
+</pre>\r
+\r
+</body>\r
+</html>\r