1
我使用emailjs發送電子郵件。 我有base64字符串。 當我發送HTML體附件base64在emailjs
attachment:
[
{data:"<html> <body> <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAFA3PEY8..."> </body> </html>", alternative:true}
]
並非所有的電子郵件客戶端顯示<img src="base64">
(如Gmail網絡或Outlook)
我想從BASE64附加文件。我該怎麼做?
我試了,但圖片均損壞:
attachment:
[
{data:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAFA3PEY8...", encoded:true, name:"file.jpeg",type:"image/jpeg"},
]
PS:我的服務器設置:
"host" : "smtp.gmail.com",
"user" : "***@gmail.com",
"password" : "******",
"ssl" : true,
"port" : 465