Currently, I am utilizing nodemailer along with express...
I aim to incorporate a text message and loading indicator on the front-end to indicate whether the form submission is in progress or not.
.ts
deliverEmail(value) {
console.log('email has been sent');
// this.form.reset();
const info = {
to: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5820202020183f35393134763b3735">[email protected]</a>',
subject: this.name,
txt: 'Email:' + this.email +
'Name:' + this.name +
'Message:' + this.message
};
return this.http.post('http://localhost:3000/api/mail/contact', info).subscribe(
data => console.log(data)
);
}