Reputation: 2333
I have the following Meteor method set up:
// Defined in collections/collections.js
Meteor.methods({
email: function(options) {
this.unblock();
Email.send(options);
}
});
which I call like this:
// Defined in client/main.js
Meteor.call('email', {
to: '[email protected]', from: '[email protected]',
text: 'testing testing'
});
I get two errors, one in the browser console:
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....)
the other in my server shell running meteor
:
Exception while invoking method 'email' ReferenceError: Email is not defined
(etc....)
What's going on? I feel like I've followed the documentation's instructions exactly, and I'm not doing anything similarly wrong as in questions like this one or this one.
Upvotes: 7
Views: 2245