-2

I need to do angular 6 integration with mail for my web application, by using this I need to send emails to the user who is going to use that web application.

Is there anyone who knows how to do this?

thanks.

koryakinp
  • 3,989
  • 6
  • 26
  • 56
Shahaji
  • 175
  • 1
  • 4
  • 14

1 Answers1

0

I’m not sure that if you want to send email to Outlook through Angular6?

However, I’m not farmilar with Angular6, but I found angular5 send email to Outlook.

You could refer to the below code:

  app.post("/sendemail", (req, res) => {
var transporter = nodemailer.createTransport({
    host: "smtp-mail.outlook.com",
    secureConnection: false,
    port: 587,
    tls: {
        chipers: "SSLv3"
    },
    auth: {
        user: "xxx@hotmail.com",
        pass: "xxx"
    }
});

var mailOptions = {
    from: "xxx@hotmail.com",
    to: "xxx@gmail.com",
    subject: "Nodejs Mail",
    text: "this is the email's body text..."
};

transporter.sendMail(mailOptions, function(error, info) {
    if (error) console.log(error);
    else console.log("Message sent successfully: " + info.response);
});
});

For more information, Please refer to this link:

Send email with Angular and NodeMailer

Angular 2 – Sending mails from your app.

Alina Li
  • 884
  • 1
  • 6
  • 5