我可以使用以下代码从Parse云代码发送电子邮件。当涉及长html模板时,我正面临格式问题。反正我是否可以调用html文件而无需复制大量的html代码?
如果有任何网站格式化html代码,可以轻松复制粘贴?
Mailgun.sendEmail({
to: email,
from: "XYZ <hello@xyz.com>",
subject: "Welcome to XYZ",
text: "Hello " + name + ",\n\n Welcome to XYZ!",
html: "<html> <b> Awesome restaurants around you </html>"
}, {
success: function(httpResponse) {
console.log(httpResponse);
console.log("Email sent to " + email);
},
error: function(httpResponse) {
console.error(httpResponse);
console.error("Uh oh, something went wrong");
}
});