Search
 
SCRIPT & CODE EXAMPLE
 

HTML

node mailer send HTML

var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');

smtpTransport = nodemailer.createTransport(smtpTransport({
    host: mailConfig.host,
    secure: mailConfig.secure,
    port: mailConfig.port,
    auth: {
        user: mailConfig.auth.user,
        pass: mailConfig.auth.pass
    }
}));
var mailOptions = {
    from: 'my@email.com',
    to : 'some@email.com',
    subject : 'test subject',
    html : { path: 'app/public/pages/emailWithPDF.html' }
};
smtpTransport.sendMail(mailOptions, function (error, response) {
    if (error) {
        console.log(error);
        callback(error);
    }
});
Comment

PREVIOUS NEXT
Code Example
Html :: types of buttons in html 
Html :: input radio 
Html :: input type on click submit buttom show 
Html :: how to bold in html 
Html :: how to make html text bold 
Html :: blinking text in html using javascript 
Html :: mvc Html.DropDownList get value 
Html :: how to get the input of a textbox in html 
Html :: opening tag closing tag 
Html :: form submission with post 
Html :: template html 
Html :: github see commits by user 
Html :: link tag 
Html :: anchor html 
Html :: swagger decimal number format 
Html :: The <input Element 
Html :: text -center bootstrap 
Html :: range slider in html 
Html :: html table cell color based on value 
Html :: how to put text next to a checkbox in html 
Html :: empty img 
Html :: html table headers 
Html :: button in input tailwinds 
Html :: table in bootstrap 4 
Html :: phone number validation html 
Html :: Using new line( ) in string and rendering the same in HTML 
Html :: bootstrap div inline cards 
Html :: html cheat sheet 
Html :: using bootstrap toast in mvc view 
Html :: input type="date" 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =