gpt4 book ai didi

Meteor 电子邮件未定义,但从 Meteor.methods 运行

转载 作者:行者123 更新时间:2023-12-04 10:51:44 25 4
gpt4 key购买 nike

我设置了以下 Meteor 方法:

// Defined in collections/collections.js
Meteor.methods({
email: function(options) {
this.unblock();
Email.send(options);
}
});

我这样称呼它:
// Defined in client/main.js
Meteor.call('email', {
to: 'yeahright@noneya.com', from: 'yeahright@noneya.com',
text: 'testing testing'
});

我收到两个错误,一个在浏览器控制台中:
Exception while simulating the effect of invoking 'email' 
ReferenceError {stack: "ReferenceError: Email is not defined↵ at Meteor…js?acc2397bd1f7321a583a30e0d4628ec4f9fded4b:369:3", message: "Email is not defined"}
ReferenceError: Email is not defined
(etc....)

另一个在我的服务器 shell 中运行 meteor :
Exception while invoking method 'email' ReferenceError: Email is not defined
(etc....)

这是怎么回事?我觉得我已经关注了 documentation's instructions确切地说,我没有做任何类似问题的错误,如 this onethis one .

最佳答案

您是否添加了电子邮件包?

meteor add email

关于Meteor 电子邮件未定义,但从 Meteor.methods 运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22108924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com