I am trying to do a very basic test with Mailgun sandbox but depending on what is in my method I get a timeout error or _this.unblock is not a function .
Specifically if I have check() in, it times out, if I leave this.unblock() in it errors as not a function.
While it isnāt an answer to your specific issue, Iād strongly suggest checking out mailgun-js, and using their api to send rather than relying on Meteorās built-in smtp functionality.
Iāll definitely check it out, I more or less just need solution to send email. Iād prefer to keep it Meteor native, but I donāt mind checking other solutions.
Check is imported. Good catch on the arrow function, that solved the āthis.unblock()ā for any lexical issues. However I am still getting a timeout.
āException while invoking method āsendEmailā Error: connect ETIMEDOUTā
I am wondering if it has something to do with my MAIL_URL.
My only guess there is that you are using port 25 and Iāve always used 587 when designating a mailgun smtp url? Also you may not want to post your credentials =)
Looping through the built-in smtp call isnāt going to be very performant. Also, as you get into sending hundreds (or thousands) of emails, you will be able to utilize mailgunās batch sending, which is built into their api.