我正在使用an AngularJS package创建二维码
我想将代码添加到我发送用户作为故障单ID的用户发送的电子邮件中。
这是我的电子邮件模板:
<template name="TicketEmail">
<p> Hi {{name}}!</p>
<p> Thank you for purchasing your ticket to {{eventName}}</p>
<p> Your ticket ID is {{ticketID}}.</p>
<qrcode class='qrcode' version="{{version}}" error-correction-level="{{level}}" size="{{size}}" data="{{var}}"></qrcode>
</template>
以下是我如何生成HTML并发送电子邮件:
var data = {
name: "John",
eventName: "Music and Stuff",
ticketID: '12345',
version: '4',
level: 'M',
size: '200',
var: '12345'
};
var html = Blaze.toHTML(Blaze.With(data, function() {
return Template.TicketEmail;
}));
var options = {
from: "John Doe <johndoe@gmail.cm>",
to: "Mike Smith <mikesmith@gmail.com>",
subject: "Ticket Purchase",
html: html,
};
Meteor.call("sendEmail", options);
$(".popup-bg").fadeOut("slow");
电子邮件发送正常但QR码未显示。