PeatioCryptoExchange
PeatioCryptoExchange copied to clipboard
nailgun smtp with google domains
Hey, @algobasket - I have my mail settings all green in nailgun and the logs are telling me that it sent the email, but nothing ever arrives? I am running this on vagrant from my localhost...
I, [2019-02-26T15:07:14.405731 #28064] INFO -- : Redirected to http://192.168.33.10/settings
I, [2019-02-26T15:07:14.405913 #28064] INFO -- : Completed 302 Found in 49ms (ActiveRecord: 4.1ms)
I, [2019-02-26T15:07:14.409695 #28064] INFO -- : Started GET "/settings" for 192.168.33.1 at 2019-02-26 15:07:14 +0000
I, [2019-02-26T15:07:14.413687 #28064] INFO -- : Processing by Private::SettingsController#index as HTML
I, [2019-02-26T15:07:14.442398 #28064] INFO -- : Rendered private/settings/index.html.slim within layouts/application (17.2ms)
I, [2019-02-26T15:07:14.445197 #28064] INFO -- : Rendered shared/_html5.html.slim (0.1ms)
I, [2019-02-26T15:07:14.445916 #28064] INFO -- : Rendered shared/_meta.html.slim (0.3ms)
I, [2019-02-26T15:07:14.446601 #28064] INFO -- : Rendered shared/_alert.html.slim (0.1ms)
I, [2019-02-26T15:07:14.452244 #28064] INFO -- : Rendered shared/_header_profile_setting.html.slim (4.3ms)
I, [2019-02-26T15:07:14.453198 #28064] INFO -- : Rendered shared/_header_lang_sel.html.slim (0.1ms)
I, [2019-02-26T15:07:14.453422 #28064] INFO -- : Rendered shared/_header.html.slim (6.5ms)
I, [2019-02-26T15:07:14.454244 #28064] INFO -- : Rendered shared/_flash.slim (0.0ms)
I, [2019-02-26T15:07:14.454622 #28064] INFO -- : Rendered shared/_frame.html.slim (0.7ms)
I, [2019-02-26T15:07:14.454996 #28064] INFO -- : Rendered shared/_footer.html.slim (0.0ms)
I, [2019-02-26T15:07:14.455394 #28064] INFO -- : Completed 200 OK in 41ms (Views: 27.7ms | ActiveRecord: 3.7ms)
I, [2019-02-26T15:08:14.568976 #1513] INFO -- :
Sent mail to [email protected] (60165.4ms)
# below settings only in production env
# system notify mail settings
# --------------------------------------------------------------
SMTP_PORT: 587
SMTP_DOMAIN: mg.cipherz.com
SMTP_ADDRESS: smtp.mailgun.org
SMTP_USERNAME: [email protected]
SMTP_PASSWORD: redacted
SMTP_AUTHENTICATION: plain # could be plain, login or cram_md5
make a simple ruby script to send mail for testing
ruby test.rb
`require 'mail' require "mail/parsers/content_type_parser"
options = { :address => "smtp.mailgun.org", :port => 587, :domain => 'mailgun.org', :user_name => '[email protected]', :password => '66d549cd183a29e697b162e01a552fb3-bd350f28-f9ec91b3', :authentication => 'plain', :enable_starttls_auto => true }
Mail.defaults do delivery_method :smtp, options end
Mail.deliver do to '[email protected]' from '[email protected]' subject 'testing sendmail' body 'testing sendmail' end`
@algobasket - I ran your script with my mailgun creds above and I received the email. I have port 587 open on incoming and outgoing profile for my ec2 instance... Not sure what else to do at this point?