Nodemailer v2.3

Proxies

This update adds built-in support for major proxy protocols. Instead of providing your own custom getSocket handler to generate a socket through SOCKS or HTTP protocol, provide a proxy configuration url and that’s it.

var smtpConfig = {
    host: 'smtp.gmail.com',
    port: 465,
    ...,
    // proxy config
    // assumes a HTTP proxy running on port 3128
    proxy: 'http://localhost:3128/'
};

You can find details about proxy support here.

Dynamic transport loading

To ease custom trasport loading, there is now a new configuration option called transport. This way you would not have to load the transport plugin in your code (you do need to install the transport plugin before you can use it), you only need to modify the configuration data accordingly.

var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
    transport: 'ses', // loads nodemailer-ses-transport
    accessKeyId: 'AWSACCESSKEY',
    secretAccessKey: 'AWS/Secret/key'
});

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.