Problem sending emails: SenderError: Mail from command failed - 501 Syntax error

Hello,

I have deployed my meteor app via meteor deploy to the standard meteor hosting; I’d like to test sending emails from server, however when I try, I get this error:

SenderError: Mail from command failed - 501 Syntax
error

It’s true, that I didn’t setup a mailgun account, but my understanding is, that meteor takes care of that… when I debug my MAIL_URL env variable it’s something like this:

smtp://postmaster%40appXXXXXX.mailgun.org:password@smtp.mailgun.org:587

My email sending code, in coffeescript looks like this:

Email.send "postmaster@appXXXXXX.mailgun.org", "testemail@testemail.com", 
"Test subject", "Test email body"

I’m probably missing something obvious. Can anybody help? Thanks

For anyone reading this post in the future, I’m sorry that this thread most likely won’t help you with your problem. There’s actually problem in my code -.-’ Email.send accepts only a single parameter options (as per documentation), so the problem is the way I pass parameters into the Email.send method. The correct way to call the method in Coffeescript is:

Email.send
  from: "postmaster@appXXXXXX.mailgun.org"
  to: "testemail@testemail.com"
  subject: "Test subject"
  text: "Test email body"