Published on

SMTP is now available in Mailisk

Today we’re adding support for virtual SMTP. This will allow you to send emails with SMTP to any Mailisk namespace. This isn’t meant as a replacement for 3rd party email services, but a way to bulk test transactional email without incuring additional cost.

Where should I use this?

If you’re already using Mailisk for your integration tests you can also switch to using Mailisk for outbound emails on your backend local/development environment. There aren’t any additional costs for sending emails and no outbound limits. So there is no risk of your tests failing because you’ve hit a limit on your email delivery service.

How do I send emails?

There’s a new section in the docs with an example for NodeJS. Here’s the code snippet for sending email using SMTP:

const nodemailer = require('nodemailer')

const SMTP_USER = 'yournamespace@mailisk.net'
const SMTP_PASSWORD = 'password'

const transport = nodemailer.createTransport({
  pool: true,
  host: 'smtp.mailisk.net',
  port: 587,
  secure: false,
  auth: {
    user: SMTP_USER,
    pass: SMTP_PASSWORD,
  },
})

async function main() {
  await transport.sendMail({
    from: 'hello@test.com',
    to: 'test@yournamespace.mailisk.net',
  })
}

main().catch(console.error)

What’s the plan for the future?

Mailisk isn’t an email delivery service, so outbound features won’t be a main focus. But for ease of use, we’re working on adding support to deliver email to addresses outside of Mailisk namespaces. This will allow you to use Mailisk SMTP for transactional emails in staging environments.