forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.67k stars 337 forks source link

How do I disable your preview default? #343

Closed nicolasxu closed 5 years ago

nicolasxu commented 5 years ago
const email = new Email({
    message: {
        from: 'testtest@gmail.com',
        send: true,
        transport: emailConfig, 
        preview: false // it always pop up a preview window. I don't want to preview. 
    }
})
ultrarunner commented 5 years ago

I had to do something like this email.config.transport = nodemailer.createTransport({ host: HOSTNAME, port: PORT, tls: { rejectUnauthorized: false } }); email.config.preview = true;