MailGun Syntax Error

Hey Guys,

Have an error that I seriously don’t understand. I have MailGun setup as my smtp for send verification emails, tutorial I’m following is here. I’ve got my smtp credentials and config set up properly, implementing the Accounts.sendVerficationEmail() and everything works perfectly…as long as I’m running locally. As soon as I upload and run off anything from Digital Ocean or a Rackspace box I get the following error:

I20150615-19:27:32.813(-4)? Exception in setTimeout callback: SenderError: Mail from command failed - 501 Syntax error
I20150615-19:27:32.815(-4)? at Object.Future.wait (/root/.meteor/packages/meteor-tool/.
I20150615-19:27:32.815(-4)? at smtpSend (packages/email/email.js:76:1)
I20150615-19:27:32.815(-4)? at Object.Email.send (packages/email/email.js:153:1)
I20150615-19:27:32.815(-4)? at Object.Accounts.sendVerificationEmail (packages/accounts-password/password_server.js:627:1)
I20150615-19:27:32.815(-4)? at app/server/config.js:252:13
I20150615-19:27:32.816(-4)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150615-19:27:32.816(-4)? at packages/meteor/timers.js:6:1
I20150615-19:27:32.816(-4)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)
I20150615-19:27:32.816(-4)? - - - - -
I20150615-19:27:32.816(-4)? at SMTPClient._actionMAIL (/root/.meteor/packages/email/.
I20150615-19:27:32.817(-4)? at SMTPClient._onData (/root/.meteor/packages/email/.
I20150615-19:27:32.817(-4)? at CleartextStream.emit (events.js:95:17)
I20150615-19:27:32.817(-4)? at CleartextStream. (stream_readable.js:765:14)
I20150615-19:27:32.817(-4)? at CleartextStream.emit (events.js:92:17)
I20150615-19:27:32.818(-4)? at emitReadable
I20150615-19:27:32.818(-4)? at _stream_readable.js:420:7
I20150615-19:27:32.818(-4)? at process._tickCallback (node.js:442:13)

On my server/config.js I have the following at line 252:13


And thats it. Like I said it works perfectly locally, but tanks remotely. Any ideas why? Such a weird thing.

Hi, user has created after error?

Hi. Yes the user is created after the error is thrown.

Hey we have exacly the same error and at the end was funny because we really have a syntax error, for us was just an unclosed tag on the Accounts.emailTemplates.from…so check if you have one syntax error xD

Now everything is Ok, we are using the same tools as you so check your syntax.


haha what are the odds of that. I just ended up switching SMTP servers so everything is working now. Thank you all for your help. :slight_smile: Hope this helps others.

1 Like