简体   繁体   English

Angular Typescript 中发送 Email

[英]Send Email in Angular Typescript

I am trying send a email with html body on click of button I am using Angular 10.0.8 is there any possible way to send email using SMTP Relay in typescript without using nodejs I am trying send a email with html body on click of button I am using Angular 10.0.8 is there any possible way to send email using SMTP Relay in typescript without using nodejs

You can use something like email.js or smtp.js您可以使用email.jssmtp.js 之类的东西

With smtp.js you can使用 smtp.js 你可以

Email.send({
    SecureToken : "C973D7AD-F097-4B95-91F4-40ABC5567812",
    To : 'them@website.com',
    From : "you@isp.com",
    Subject : "This is the subject",
    Body : "And this is the body"
}).then(
  message => alert(message)
);

The security key is generated on the website and is different for your credentials安全密钥是在网站上生成的,与您的凭据不同

but this only supports Elasticmail securely at this time smtpjs.com for documentation但这目前仅安全地支持 Elasticmail smtpjs.com 文档

and email.js is a paid service email.js 是付费服务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM