Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
The reason Nodemailer is not working is almost certainly the same reason it fails on Droplets: DigitalOcean blocks outbound SMTP ports by default across all its infrastructure, including App Platform. This is not specific to your setup, it is a platform level restriction. More context here: https://docs.digitalocean.com/support/why-is-smtp-blocked/
The fix is to use a dedicated SMTP service that supports an alternative port like 2525 which is not blocked. smtpfa.st works well for this and plugs into Nodemailer with a simple config change:
const transporter = nodemailer.createTransport({
host: 'smtp.smtpfa.st',
port: 2525,
secure: false,
auth: {
user: 'your-username',
pass: 'your-password',
},
});
For deliverability, make sure your sending domain has SPF, DKIM, and DMARC records set up. smtpfa.st has built in tools for checking these. If you want to understand what is actually happening between your app and the inbox, this interactive SMTP flow simulator is worth a look: https://devops-daily.com/games/smtp-flow-simulator
One App Platform specific thing worth knowing: store your SMTP credentials as encrypted environment variables in the App Platform dashboard rather than hardcoding them. Go to your app settings, add them under Environment Variables, and reference them in your code as process.env.SMTP_USER and process.env.SMTP_PASSWORD.
If you are building an AI-powered app and want your agent to be able to send emails as a tool call rather than managing SMTP directly, smtpfa.st also has an MCP server for exactly that: https://smtpfa.st/docs/mcp
Hi there,
Rather than reconfiguring Nodemailer to use an alternate SMTP port through a relay, it is worth skipping SMTP entirely and sending through your provider’s HTTP API instead. Since that traffic goes out over standard HTTPS on port 443, it is never subject to the SMTP port block in the first place, so you are not depending on a specific relay supporting a nonstandard port like 2525.
DigitalOcean actually has a tutorial for this exact pattern on App Platform, using Resend’s HTTP API to send confirmation emails. The setup is a RESEND_API_KEY and a RESEND_EMAIL_FROM address verified in your Resend account, both stored as encrypted app-level environment variables the same way Bobby described, then a single resend.Emails.send() call with from, to, subject, and html parameters. Providers like Postmark and Mailgun offer the same kind of HTTP API if you want to compare deliverability and pricing, but the pattern is the same regardless of which one you pick.
On your specific question of whether App Platform needs anything different from a Droplet: DigitalOcean’s own documentation on the SMTP block only describes it in terms of Droplets, but in practice it applies identically to App Platform, both block outbound SMTP on ports 25, 465, and 587. So there is no extra App Platform-specific restriction to plan around, the fix is the same either way, and using an HTTP API instead of SMTP avoids the question entirely going forward.
Regards