How to use the nodemailer/lib/mime-funcs.encodeWords function in nodemailer

To help you get started, we’ve selected a few nodemailer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nodemailer / mailcast / lib / message-renderer.js View on Github external
to: {
            name: subscriberData.name,
            address: subscriberData.email
        },

        sender: {
            name: listData.name,
            address: verpAddress
        },

        headers: {
            'x-fbl': mail._id.toString(),
            'List-ID': {
                prepared: true,
                value: mimeFuncs.encodeWords(listData.name, false, false, true) + ' <' + listData._id + '.' + options.hostname + '>'
            },
            'List-Unsubscribe': {
                prepared: true,
                value: '<' + locals.UNSUBSCRIBE_URL.replace(/\s+/g, '+') + '>'
            },
            Precedence: 'bulk',
            'X-Mailer': options.appname + ' (+ ' + options.appurl + ')',
            'X-Auto-Response-Suppress': 'OOF, AutoReply'
        },

        subject: options.subjectTemplate(locals)
    };

    locals.CONTENTS = options.htmlTemplate(locals);
    let html = options.layoutTemplate(locals);
    if (html) {