air*_*lok 1 javascript email node.js meteor
添加Meteor的电子邮件包并重新启动服务器(为了更好的衡量),我这样做:
Template.messaging.events({
'click #send-message' : function () {
Email.send({
from: 'test@gmail.com',
to: 'test2@gmail.com',
html: 'heyo buddy.'
});
}
});
Run Code Online (Sandbox Code Playgroud)
当我触发事件时,控制台吐出:
Uncaught ReferenceError: Email is not defined
Run Code Online (Sandbox Code Playgroud)
文档说即使是未配置的,Email.send()也应该输出到标准输出.部署到meteor.com时遇到同样的问题,应该使用Mailgun自动设置.
有任何想法吗?