[英]Style a mail send using smtp.js
我正在創建網站來預訂我的旅行社。 我只有幾個包,我正在收集 firebase 中的文件。 每當有人預訂旅行時,都會使用簡單的 smtp.js 將確認 email 發送給客戶端。 我正在使用給出的代碼來這樣做。
Email.send({
Host: "smtp.gmail.com",
Username: "trippyadive.web.app@gmail.com",
Password: "xxxxxxxxxx",
To: email,
From: "trippyadive.web.app@gmail.com",
Subject: "Sending Email using javascript",
Body: `Your package of ${packageFields} for ${name} with total ${persons} persons (incl. ${name}) dated ${date} has been provisonalised. Your seat will be confirmed once you complete the payment of the Security Deposit`,
})
我想為發送的 email 添加一些樣式,即在Body
中。 特別是做個表,加上一些css。
有什么辦法嗎? 如果是,請說明方法。
感謝您提前提供任何幫助。
在嘗試 HTML email 之前,您應該查看這篇文章。
我在 smtp.js 文檔中找不到對 HTML 電子郵件的任何引用,但嘗試它並沒有害處。 我會這樣做只是為了知道 html 是否按原樣傳播:
Email.send({
Host: "smtp.gmail.com",
Username: "trippyadive.web.app@gmail.com",
Password: "xxxxxxxxxx",
To: email,
From: "trippyadive.web.app@gmail.com",
Subject: "Sending Email using javascript",
Body: `<strong>Your package</strong> of ${packageFields} for ${name} with total ${persons} persons (incl. ${name}) dated ${date} has been provisonalised. Your seat will be confirmed once you complete the payment of the Security Deposit`,
})
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.