O'Reilly logo

Node Cookbook by David Mark Clements

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an SMTP server

We don't have to rely on a third-party SMTP server, we can create our own!

In this recipe, we'll create our own internal SMTP server (just like the first SMTP servers) using the third-party simplesmtp module which is an underlying library of the nodemailer module from the first recipe of this chapter, Sending email. For information on converting an internal SMTP server to an externally exposed MX record server, see the There's more... section at the end of this recipe.

Getting ready

Let's create a file and call it server.js, then make a new folder called mailboxes, containing three subfolders: bob, bib, and susie. We'll also want to have our mailout.js file from the first recipe to hand.

How to do it...

First, we'll set up ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required