Skip to main content
You can integrate mySMTP into any application using standard SMTP libraries. Each example below uses secure authentication and TLS encryption.

Connection settings

Never hardcode SMTP passwords in source code. Load credentials from environment variables, secrets managers, or encrypted configuration files.

Choose your language or tool

PHP

PHPMailer and Symfony Mailer examples with Composer.

Python

smtplib standard library examples with STARTTLS and implicit TLS.

Node.js

Nodemailer with async sendMail and connection verification.

.NET

MailKit with STARTTLS, secure socket options, and MIME support.

Java

Jakarta Mail (Angus Mail) with Session and Authenticator.

Command Line

Test with swaks, OpenSSL, and telnet for quick debugging.
Shared IP plans are only available to customers in Denmark. All other customers use a dedicated IP hostname from the setup email.
Before sending from production, verify your domain authentication with the mySMTP Deliverability Toolbox. It includes 19 free tools including SPF validation and sender readiness checks.