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

Error 505 when Sign Up using mailgun #353

Closed
JonasBarcat opened this issue Jun 22, 2022 · 4 comments
Closed

Error 505 when Sign Up using mailgun #353

JonasBarcat opened this issue Jun 22, 2022 · 4 comments

Comments

@JonasBarcat
Copy link

Hello, I've been trying to setup mailgun in pwpusher using a local docker container with a local mysql db in another container.
I use this command to run the container. It works but when I fill the sign up form and send it, it gives me the error.

docker run -d -p "5100:5100" -e DATABASE_URL=mysql2://root:jonas@172.17.0.2:3306/pwpush_db -e PWP__ENABLE_LOGINS=true -e PWP__MAIL__RAISE_DELIVERY_ERRORS=true -e PWP__MAIL__SMTP_PORT=587 -e PWP__MAIL__SMTP_ADDRESS=smtp.mailgun.org -e PWP__MAIL__SMTP_USER_NAME=<my-username> -e PWP__MAIL__SMTP_PASSWORD=<my-password> -e PWP__MAIL__SMTP_AUTHENTICATION=plain -e PWP__MAIL__SMTP_STARTTLS=true -e PWP__MAIL__OPEN_TIMEOUT=10 -e PWP__MAIL__READ_TIMEOUT=10 -e PWP__HOST_PROTOCOL=https -e PWP__MAIL__MAILER_SENDER='"Company Name" <user@example.com>' -e PWP__ALLOW_ANONYMOUS=true pglombardo/pwpush-mysql:release

I tried to setting it up from config/settings.yml but I get the same error. Thank you for your help.

@pglombardo
Copy link
Owner

Ugh I have to move those config vars into a config file :-)

I don't see an error here.

The related error message should be in /opt/PasswordPusher/log/*.log inside the container.

Could you find that log file and post the error message you find there? That should point us in the right direction.

@JonasBarcat
Copy link
Author

JonasBarcat commented Jun 23, 2022

Log message

ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
8: <p><%= _('You can confirm your account email through the link below') %>:</p>
10: <p><%= link_to _('Confirm my account'), confirmation_url(@resource, confirmation_token: @token) %></p>
12: <p>&nbsp;</p>
13: <p><%= _('Thanks for signing up!') %></p>
`app/views/devise/mailer/confirmation_instructions.html.erb:10

I've found this #265 (comment)
I'll try to configure the PWP__HOST_DOMAIN variable too.

@JonasBarcat
Copy link
Author

I solved this, I configured the PWP__HOST_DOMAIN=localhost:5100 (in my case I run it locally)

Thank you for your help, really appreciate it!

@pglombardo
Copy link
Owner

That's great to hear. Anything else - don't hesitate.

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