can't send mail using smtp "An error occurred while sending mail (execution expired)"
Added by tikoti tikoti over 10 years ago
Hi all,
I know this issue has been discussed a hundred times before, but still I am unable to make it work
- ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
- Rails 3.2.17
- CentOS 6.5
- mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
- probably Webrick...
My entire configuration.yml file is as follows
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "my_account@gmail.com"
password: "my_password"
I have copied it from the documentation, but I keep getting the following error
"An error occurred while sending mail (execution expired)"
Don't know what to do now,
I would greatly appreciate any help or advice
Thank you in advance!
Replies (7)
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by Martin Denizet (redmine.org team member) over 10 years ago
Hi Tikoti,
You could try async delivery.
Are you located in China? Google services have been disrupted there for the past few weeks.
Cheers,
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by tikoti tikoti over 10 years ago
Hi Martin,
I'm located in Spain, gmail is working as a charm
I have changed to asyncronous, without luck
production:
email_delivery:
delivery_method: :async_smtp
async_smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
I am a little bit concern though that the error remains the same ""An error occurred while sending mail (execution expired)"
I just change the configuration.yml by hand, perhaps I didn't install redmine correctly? Is it posible that it isn't taking my changes into account?
Regards,
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by tikoti tikoti over 10 years ago
I have commented out
config.action_mailer.logger = nil in
config/environments/production.rb
as suggested in http://www.redmine.org/projects/redmine/wiki/FAQ#Email-notifications-are-not-working
and now I get the following error
(Permission denied - connect(2))
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by tikoti tikoti over 10 years ago
New error with gmail
(wrong argument (NilClass)! (Expected kind of OpenSSL::SSL::SSLContext))
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by tikoti tikoti over 10 years ago
I have finally solved by using the fix suggested in another post
gem install mail -v 2.5.3
edit Gemfile.lock and substitute mail 2.5.4 → mail 2.5.3
restart apache -> service httpd restart
my configuration.yml is as follows
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user name:
password:
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by Salem BA over 8 years ago
Hi,
I've tried Tikoti's solution without success. Below the error message.
Erreur lors de l'envoi de l'email (Timeout::Error).
configuration.yml [Production section]
--------------------------------------
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: testtest@gmail.com
password: ABCD12345abcd
Here are my environment informations.
I'm really stuck at this point.
RE: can't send mail using smtp "An error occurred while sending mail (execution expired)" - Added by claude g almost 8 years ago
maybe too late but did you try with int type for the port (without quote')
port: 587