![](/img/trans.png)
[英]Can we use gmail API in aws lambda python runtime to send mail?
[英]How can we build a node api which will send mail to users and will also generate otp for accessing my python microservices
Is there a way to write an email API on nodejs so that an email containing unique auto-generated OTP will be sent to the user in order to access my python micro-services?
Nodemailer是一个流行的模块,用于在 nodejs 中发送 email。 您可以在网站上找到所有详细信息。
或者,您可以使用第 3 方 API 来处理交易电子邮件。 以我的经验, SendGrid完成了这项工作,并且有一个易于实现的简洁 API。
就 OTP 而言,您可以使用任何您喜欢的方式来生成密码,只是永远不要使用Math.random
,因为它不安全。 一般来说,这就是我构建我的应用程序的方式:
如果您需要任何代码示例或其他任何内容,请告诉我,我将编辑我的答案。 希望这可以帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.