Move busui to seperate repository
[bus.git] / pop3_before_smtp_test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
<head>
<title>POP before SMTP Test</title>
</head>
 
<body>
 
<pre>
<?php
  require 'class.phpmailer.php';
  require 'class.pop3.php';
 
  $pop = new POP3();
  $pop->Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);
 
  $mail = new PHPMailer();
 
  $mail->IsSMTP();
  $mail->SMTPDebug = 2;
  $mail->IsHTML(false);
 
  $mail->Host     = 'relay.example.com';
 
  $mail->From     = 'mailer@example.com';
  $mail->FromName = 'Example Mailer';
 
  $mail->Subject  =  'My subject';
  $mail->Body     =  'Hello world';
  $mail->AddAddress('name@anydomain.com', 'First Last');
 
  if (!$mail->Send())
  {
    echo $mail->ErrorInfo;
  }
?>
</pre>
 
</body>
</html>