![](/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.