Sending mail via Mailgun

270 views
Skip to first unread message

Nolan Darilek

unread,
Jul 22, 2015, 2:32:25 PM7/22/15
to Sandstorm Development
Getting the following when attempting to test my Mailgun SMTP connection:

Exception while invoking method 'testSend' Error: getaddrinfo ENOTFOUND
at Object.Future.wait
(/programs/server/node_modules/fibers/future.js:398:15
)
at smtpSend (packages/sandstorm-email/email.js:101:1)
at Object.SandstormEmail.rawSend
(packages/sandstorm-email/email.js:176:1)
at Object.SandstormEmail.send (packages/sandstorm-email/email.js:161:1)
at [object Object].Meteor.methods.testSend (app/shared/admin.js:871:22)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
at packages/ddp/livedata_server.js:648:1
at [object Object]._.extend.withValue
(packages/meteor/dynamics_nodejs.js:56
:1)
at packages/ddp/livedata_server.js:647:1
at [object Object]._.extend.withValue
(packages/meteor/dynamics_nodejs.js:56
:1)
- - - - -
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)


Is this the correct format for a Mailgun-compatible SMTP URL? Here is
what I've been told to use, sensitive credentials scrubbed of course:

SMTP Hostname
smtp.mailgun.org
Default SMTP Login
postm...@sandstorm.thewordnerd.info
Default Password
password

And my URL:

smtp://postmaster%40sandstorm.thewordnerd.info:pass...@smtp.mailgun.org:587

smtp.mailgun.org is pingable from the Sandstorm VM.

hanks.

Nolan Darilek

unread,
Jul 22, 2015, 3:49:15 PM7/22/15
to Sandstorm Development
Huh, odd. I just had to rebuild the VM from scratch, tried again to see
what happened, and now everything works.

Either way, might be useful with that exception to report which address
couldn't be looked up. :) I'll file an issue soon.

Kenton Varda

unread,
Jul 24, 2015, 4:02:25 PM7/24/15
to Nolan Darilek, Sandstorm Development
Hi Nolan,

One reason this might have happened is because Sandstorm copies /etc/resolv.conf into its container when it starts up and thus will need to be restarted if it changes. A "sandstorm restart" command should do the trick, rather than restarting the whole VM. This is a known bug but non-trivial for us to fix:


-Kenton

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kenton Varda

unread,
Jul 24, 2015, 4:03:14 PM7/24/15
to Nolan Darilek, Sandstorm Development
That is to say, it could be that Sandstorm was using stale DNS settings. The failure was almost certainly when trying to look up smtp.mailgun.org.

-Kenton
Reply all
Reply to author
Forward
0 new messages