Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nailgun smtp with google domains #46

Open
cipherzzz opened this issue Feb 26, 2019 · 3 comments
Open

nailgun smtp with google domains #46

cipherzzz opened this issue Feb 26, 2019 · 3 comments

Comments

@cipherzzz
Copy link

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 markmathis@gmail.com (60165.4ms)

image

  # 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: postmaster@mg.cipherz.com
  SMTP_PASSWORD: redacted
  SMTP_AUTHENTICATION: plain # could be plain, login or cram_md5
@algobasket
Copy link
Owner

make a simple ruby script to send mail for testing

ruby test.rb

@algobasket
Copy link
Owner

`require 'mail'
require "mail/parsers/content_type_parser"

options = { :address => "smtp.mailgun.org",
:port => 587,
:domain => 'mailgun.org',
:user_name => 'postmaster@peatio.info',
:password => '66d549cd183a29e697b162e01a552fb3-bd350f28-f9ec91b3',
:authentication => 'plain',
:enable_starttls_auto => true }

Mail.defaults do
delivery_method :smtp, options
end

Mail.deliver do
to 'algobasket@gmail.com'
from 'developer@peatio.info'
subject 'testing sendmail'
body 'testing sendmail'
end`

@cipherzzz
Copy link
Author

cipherzzz commented Mar 17, 2019

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants