Answer the question
In order to leave comments, you need to log in
Angular 2 how to send email using typescript?
Is it possible to use the nodemailer module in a file with the .ts extension and use it to send emails.
const nodemailer = require('nodemailer');
let transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '[email protected]',
pass: 'your pass'
}
});
Answer the question
In order to leave comments, you need to log in
nodemailer runs on the server, not in the browser. Make a service in Angular that will interact with the server on the node.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question