E
E
Evolove2016-03-10 17:10:55
Node.js
Evolove, 2016-03-10 17:10:55

How to send email in node js?

Problem sending mail with nodemailer. How to specify that the sending goes from the mailbox on the server?

var transporter = mail.createTransport({
        service: 'Gmail',
        auth: {
            user: '[email protected]',
            pass: '***'
        }
    });

    var mailOptions = {
        from: 'Autorization <[email protected]>',
        to: '[email protected]',
        subject: 'Hello',
        html: '<b>test</b>'
    };

    transporter.sendMail(mailOptions, function (err, info) {
        res.end('OK');
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2016-03-10
@k12th

https://github.com/andris9/nodemailer-sendmail-tra...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question