Content
Email (gmail) not working for me yet
Added by Ronald Wiplinger over 9 years ago
I added a new user and click Assign random password (sent to user via e-mail)
I receive an error:
*Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your OpenProject administrator for assistance.
If you are the OpenProject administrator, check your log files for details about the error.*
log file tells me:
Sent mail to tm.xxxxx
gmail.com (1283.1ms)
Completed 500 Internal Server Error in 1332.7ms
Net::SMTPAuthenticationError (534-5.7.9 Application-specific password required. Learn more at
):
app/controllers/users_controller.rb:191:in `update’
app/middleware/params_parser_with_exclusion.rb:40:in `call’
@
I created a application-specific password (that is instead of a two-factor authentication)
my configiguration.yml looks like:
@
production:
email_delivery_method: “smtp”
smtp_enable_starttls_auto: true
smtp_address: “smtp.gmail.com”
smtp_port: 587
smtp_domain: “smtp.gmail.com” # ‘your.domain.com’ for GoogleApps
smtp_authentication: :plain
smtp_user_name: “xxxxxx@gmail.com”
smtp_password: “xxxxxxxxxxxx”
default:
rails_force_ssl: false
rails_cache_store: :memcache
session_store: :cache_store
disable_password_choice: false
development:
email_delivery_method: :letter_opener
test:
email_delivery_method: :test
@
Replies (3)
Ronald, did you enable IMAP in the gmail settings for the account in “smtp_user_name”? Should be under the https://mail.google.com/mail/u/0/#settings/fwdandpop section.
I don’t see anything wrong with your config, it looks the same as mine (except for the user/password obviously) which is successfully sending emails. That said, I don’t have 2FA set up. You might try temporarily disabling 2FA and making sure you can send emails, that way you’re sure you’re only troubleshooting one problem.
A lots of reading Google pages….
SOLVED:
https://accounts.google.com/DisplayUnlockCaptcha
lets you access your gmail account again. HOWEVER, you need to wait 10+ minutes. Now it works!
It is because Google blocks sign-in attempts from apps which do not use modern security standards (mentioned on their support page). You can however, turn on/off this safety feature by going to the link below:
Go to this link and select Turn On
https://www.google.com/settings/security/lesssecureapps
Moreover google block an ip when you try to send a email since a unusual location, so, you can unblock in the next link
https://support.google.com/accounts/answer/6009563
and clicked in
accounts.google.com/DisplayUnlockCaptcha .
http://net-informations.com/python/net/email.htm