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/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
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/.1.0.6.1rj8k8w++os+web.browser+web.cordova/npm/node_modules/simplesmtp/lib/client.js:879:23)
I20150615-19:27:32.817(-4)? at SMTPClient._onData (/root/.meteor/packages/email/.1.0.6.1rj8k8w++os+web.browser+web.cordova/npm/node_modules/simplesmtp/lib/client.js:329:29)
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
(_stream_readable.js:427:10)
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

Accounts.sendVerificationEmail(user._id);

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.

Julián

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