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

SMTP-AUTH requested but missing secret phrase #344

Open
rdmrm4g00 opened this issue Dec 23, 2020 · 0 comments
Open

SMTP-AUTH requested but missing secret phrase #344

rdmrm4g00 opened this issue Dec 23, 2020 · 0 comments

Comments

@rdmrm4g00
Copy link

rdmrm4g00 commented Dec 23, 2020

SMTP-AUTH requested but missing secret phrase
STAYTUS_SMTP_HOSTNAME: '@.co.uk'
STAYTUS_SMTP_PORT: '25'
STAYTUS_SMTP_USERNAME: '@***.co.uk'
STAUTYS_SMTP_PASSWORD: ''

Project using Ubuntu 16.04 - SMTP-AUTH requested but missing secret phrase when running procdile - foreground;4

Issue seems to be because the following config file is referencing the wrong ruby rails smtp definition - for my setup - not sure if anyone else using 16.04 has had this, but thought I'd flag this as the only fix was looking at what your code is calling and then I noticed the rail smtp settings definition was different, changing this to just username fixed my issue;

if ENV['STAYTUS_SMTP_HOSTNAME']
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => ENV['STAYTUS_SMTP_HOSTNAME'],
:port => ENV['STAYTUS_SMTP_PORT'],
:user_name => ENV['STAYTUS_SMTP_USERNAME'],
:password => ENV['STAYTUS_SMTP_PASSWORD']
}
else
puts "\e[33m=> You haven't configured an SMTP server. Mail will be sent using sendmail.\e[0m"
ActionMailer::Base.delivery_method = :sendmail
end

Mail.defaults do
if ActionMailer::Base.delivery_method == :smtp
delivery_method :smtp, ActionMailer::Base.smtp_settings
else
delivery_method ActionMailer::Base.delivery_method
end
end

==================================================================================
I've changed :user_name => ENV['STAYTUS_SMTP_USERNAME'], to :username => ENV['STAYTUS_SMTP_USERNAME'],
and this now allows smtp via ruby rails smtp

defined in /opt/staytus/config/initializers/smtp.rb and this is using /usr/lib/ruby/2.3.0/net/smtp.rb

also following the guide provided exactly verbatim from https://blog.k.io/atech/install-staytus-tutorial = fails with "nio4r-2.5.4 requires ruby version >= 2.4, which is incompatible with the current version, ruby 2.3.8p459" - no amount of updating ruby /gem using rvm / other alts I could find - fixed this issue following this guide verbatim - and the guide itself fails because the conf file via nginx steps doesnt exist- up to you if you want to update or remove.

Just an FYI

Thanks for the hard work so far!

Thanks,
Ross

==================================================================================

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

1 participant