PHP   23

PHPMailer

Guest on 24th May 2022 02:54:02 PM

  1. <?php
  2. $pop->authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);
  3. $mail = new PHPMailer(); $mail->SMTPDebug = 2; $mail->isSMTP();
  4. $mail->isHTML(false); $mail->Host = 'relay.example.com';
  5. $mail->From = 'mailer@example.com';
  6. $mail->FromName = 'Example Mailer';
  7. $mail->Subject = 'My subject';
  8. $mail->Body = 'Hello world';
  9. $mail->addAddress('rich@corephp.co.uk', 'Richard Davey');
  10. if (!$mail->send()) {
  11.     echo $mail->ErrorInfo;
  12. }
  13. ?>

Raw Paste


Login or Register to edit or fork this paste. It's free.