HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/phpmailer/examples/pop3_before_smtp_test.php
<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     = '[email protected]';
  $mail->FromName = 'Example Mailer';

  $mail->Subject  =  'My subject';
  $mail->Body     =  'Hello world';
  $mail->AddAddress('[email protected]', 'First Last');

  if (!$mail->Send())
  {
    echo $mail->ErrorInfo;
  }
?>
</pre>

</body>
</html>