For Developers By Developers

You can integrate Mailazy in minutes with your platform. Build and monitor your email solution on a trusted foundation with technical and strategic support when you need it the most.

Configure SMTP with Nextjs


You need to complete these given prerequisites, you can skip the step if you have already completed.

  1. Sign up for a Mailazy account.

  2. Complete Domain Authentication.

  3. Generate the Mailazy Access Key

Integrate Mailazy with NextJs

  1. Create Next App
npx create-next-app
  1. Add the Form
< form className={styles.main} > < formGroup className={styles.inputGroup} > < label htmlFor='name'>Name < input type='text' onChange={(e)=>{setName(}} name='name' className={styles.inputField} /> < formGroup className={styles.inputGroup} > < label htmlFor='email'>Email < input type='text' onChange={(e)=>{setEmail(}} name='email’' className={styles.inputField} /> < formGroup className={styles.inputGroup} > < label htmlFor='message'>Message < input type='text' onChange={(e)=>{setMessage(}} name='message' className={styles.inputField} /> < input type='submit' onChange={(e)=>{setSubmitted(}}/>
  1. Added StyleSheet
.inputGroup {
  height: 50%;
  width: 200%;
  display: flex;
  flex-direction: column;
  margin: 10px 0;
.inputLabel {
  text-align: left;
.inputField {
  height: 30px;
  1. Set up Nodemailer
export default function (req, res) {
let nodemailer = require('nodemailer')
const transporter = nodemailer.createTransport({
  port: 587,
  host: "",
  auth: {
    user: process.env.mailazy_apikey,
    pass: process.env.mailazy_secret,
  secure: false,

const mailData = {
  from: 'demo email',
  to: 'your email',
  subject: `Message From ${}`,
  text: req.body.message + " | Sent from: " +,
  html: `

Sent from: ${}

` } transporter.sendMail(mailData, function (err, info) { if(err) console.log(err) else console.log(info) }) res.status(200) }

Send Emails with Mailazy

Mailazy is a simple email service to use, yet it provides so many benefits. Mailazy is the only simple transactional email service you’ll need. And the forever free plan lets you test drive it., Mailazy's team is well-equipped to help you quickly resolve your queries and issues. Try us for free today!

Signup for Free Developer Documentation

Ready to get started?

For High-Volume custom requirements send us an email and we will come up with a detailed quote within 24 hours.

Contact Us