Docs / Using SMTP

Sending email over SMTP

Postwing exposes a standard SMTP relay. Point any SMTP-capable application or library at it — set the host, a port, and your token credentials — and your existing code keeps working, no SDK required. The relay accepts three connection modes: SSL/TLS (implicit), STARTTLS, and plain (no encryption). Pick the port that matches the mode your client uses.

Connection settings

VariableValue
Server Addresssmtp.postwing.app
SSL / TLS465 or 8465
STARTTLS587 or 8587
Ports (no encryption)25 or 8025
UsernameSpecified when creating token
PasswordGenerated automatically when creating token. Not stored in plain text, cannot be recovered if lost.

Encryption modes

The same server handles every mode — only the port and the client-side flag differ. If you are unsure, use SSL/TLS on port 465: it is the simplest to configure and encrypted from the first byte.

ModePortsHow it works
SSL / TLS (implicit)465, 8465 The connection is encrypted from the start (SMTPS). In most libraries this is the secure: true / SSL / tls-on-connect option. Recommended.
STARTTLS587, 8587 The session starts in plain text and is upgraded to TLS with the STARTTLS command before authentication. Enable STARTTLS / EnableSsl / enable_starttls_auto in your client.
Plain (no encryption)25, 8025 No transport encryption — credentials and message data travel in clear text. Use only on a trusted network; prefer SSL/TLS or STARTTLS everywhere else.
Each mode is also available on a high port (8465, 8587, 8025). Some hosting providers and clouds block the standard mail ports (25, 465, 587) on outbound connections — if a connection times out, switch to the matching high port.

Credentials

The username and password are the SMTP token for your domain. Generate one on the token management page in the dashboard. For security a token's password is shown only once, at the moment it is created, and is never stored in plain text — copy it immediately and keep it safe.

Verifying the connection

To confirm sending works you can use the swaks command-line utility. The examples below send the same test message over each mode — replace the addresses and token credentials with your own.

SSL / TLS (port 465)

bash
swaks --to recipient@your-domain.com \
      --from sender@your-domain.com \
      --server smtp.postwing.app:465 \
      --tls-on-connect \
      --auth-user token_login@your-domain.com \
      --auth-password token_password

STARTTLS (port 587)

bash
swaks --to recipient@your-domain.com \
      --from sender@your-domain.com \
      --server smtp.postwing.app:587 \
      --tls \
      --auth-user token_login@your-domain.com \
      --auth-password token_password

Plain, no encryption (port 8025)

bash
swaks --to recipient@your-domain.com \
      --from sender@your-domain.com \
      --server smtp.postwing.app:8025 \
      --auth-user token_login@your-domain.com \
      --auth-password token_password
Attention!
When using BCC, CC - a separate email will be created for each recipient in the system and your limits will be used.