Examples! – for PHPMailer Pro

Basic and advanced examples to help you get up to speed quickly.

With the exception of SMTP examples, PHPMailer Pro will automatically detect the MTA (Mail Transfer Agent). There is no requirement to add properties for IsQmail, IsSendmail, or IsMail. The properties are deprecated and will be removed in a future release.
Notes:

  • PHP mail() is only supported when sendmail is inaccessible. (PHP mail() is a wrapper for sendmail)
  • sendmail example is the same for Postfix, Qmail, Exim, etc.
  • SMTP tls is not supported on port 465 (implicit tls)

Have a look:

Basic Example (sendmail)

Advanced Example (sendmail)

Advanced Example (SMTP)

Advanced Example (SMTP - no authentication)

PHPMailer Compatibility (drop-in replacement) example (not included in download all)

Download all examples