I'm attempting to send a simple email (locally, so my environment variables aren't set), and I get: Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.
Here's my code
Meteor.methods({
sendInviteEmail: function(emails) {
console.log("[sendInviteEmails], ", emails);
if (emails !== void 0) {
console.log("[sendInviteEmails] calling meteor method: sendEmail");
return Meteor.call("sendEmail", emails, "email@gmail.com", "test", "test");
}
},
sendEmail: function(to, from, subject, text) {
this.unblock();
Email.send({
to: to,
from: from,
subject: subject,
text: text,
});
},
});
I'm on calling sendInviteEmail (will be checking it for validaty on the server) from the client and passing that data to sendEmail (which is why i have a bit of redudancy currently). My code is basically from docs.meteor.com, so I'm wondering why this would present a fiber issue.
Thanks much