Page cover

βœ‰οΈSMTP Mailer

Create and send multipart MIME messages.

KSMTPMailer Class Overview

  • MIME Multipart Message Creation Easily create MIME multipart messages with support for text, HTML content, and file attachments.

  • Secure and Non-Secure Connections Supports STARTTLS/TLS (default) for secure communication and non-secured connections when required.

  • Authentication Options Compatible with both OAuth 2.0 and basic authentication for flexible access to SMTP servers.

  • Automatic MX Record Lookup If the SMTP host is not specified, automatically queries DNS for the highest-priority MX record.

  • Enhanced Mail Header Automatically includes the X-Mailer header to identify the sending application.

circle-info

For servers requiring OAuth 2.0 authentication, leverage the Simple OAuth 2.0 Framework for Authenticationarrow-up-right (Freeware) to obtain access tokens efficiently and securely.

Prerequisites

The KSMTPMailer class requires the following Jakarta/Angus Mail jar files:

  • angus-activation-2.0.x.jar

  • angus-mail-2.0.x.jar

  • jakarta.activation-api-2.1.x.jar

  • jakarta.mail-api-2.1.x.jar

If you do not already have these jar files, you may download them here. Just place the files in a directory pointed to by the JVM class path.

file-archive
752KB

Example

Last updated