Skip to content

Sending over SMTP

For anything that already speaks SMTP. Four settings:

Host smtp.mg.truo.cloud
Port 465
Encryption Implicit TLS (SMTPS) — TLS from the first byte, no upgrade
Username / password From your panel

The SMTP username and password are issued separately from the mg_live_... key, and neither works in the other’s place. Both are in your panel, on the service’s SMTP tab. The username is not an email address.

import nodemailer from "nodemailer";
const transport = nodemailer.createTransport({
host: "smtp.mg.truo.cloud",
port: 465,
secure: true, // implicit TLS. `false` here attempts STARTTLS and stalls.
auth: {
user: process.env.MG_SMTP_USER,
pass: process.env.MG_SMTP_PASSWORD,
},
});
await transport.sendMail({
from: "Acme <no-reply@acme.com>",
to: "customer@example.com",
subject: "Your receipt",
html: "<p>Thanks for your order.</p>",
});

Same domains, same quota, same stats. Two practical differences:

  • Errors arrive as SMTP replies, not JSON. An unverified sending domain is a 554 when the message is handed over, not a 403.
  • The sender still has to be a verified domain, and something in your stack may be rewriting it. The rejected address is the one that actually left your application, not the one you typed. Log it before assuming the verification is at fault.