Skip to main content

Prerequisites

SMTP credentials

To set up your SMTP integration, you’ll need to provide the following credentials:
  • Host: smtp-out.mailrify.com
  • Port: 465, 587, 2465, or 2587
  • Username: sendit
  • Password: YOUR-API-KEY

Send email using Nodemailer with SMTP support

const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
  host: "smtp-out.mailrify.com",
  port: 465,
  secure: true,
  auth: {
    user: "sendit",
    pass: "YOUR-API-KEY",
  }
});

const mailOptions = {
  from: 'Your app <[email protected]>',
  to: '[email protected]',
  subject: 'Welcome to Mailrify 🚀',
  html: '<p>It works! 👋</p>',
};

transporter.sendMail(mailOptions, (error, info) => {
  if (error) {
    console.error("Error sending email:", error);
  } else {
    console.log("Email sent successfully:", info.response);
  }
});