error throws when testing email

Added by dinesh kumar over 11 years ago

reader,
[An error occurred while sending mail (execution expired)] this error occur when testing the email .. what to do further !!!!!!!!!!

Replies (10)

RE: error throws when testing email - Added by Thomas Lecavelier over 11 years ago

Further?

  1. Using only one exclamation mark by sentence => Multiple exclamation marks are sign of mental illness
  2. Buying me a new crystal ball, or giving use some more information, like what's your version of redmine, your database backend, your ruby and rails versions, what you tried to achieve, what are your way to send email, in which part of the application your meet this error, so on...

As you see, there's plenty of things you can do for yourself.

RE: error throws when testing email - Added by dinesh kumar over 11 years ago

Redmine version : redmine-0.7.0_RC1
Database back end : mysql5.0
Ruby on Rails :2.0.2
serve : Webrick

target : Email is sent when issue is added or updated.

error occurs when testing the email [error is : An error occurred while sending mail (execution expired) ].

guide please !!!!!!!!!!!

RE: error throws when testing email - Added by Thomas Lecavelier over 11 years ago

Please REALLY consider point 1.

Have you check your config/environment.rb mail settings? This kind of hang occur when there's a mistake in this configuration. The best to be sure is to disable mail notification: just toggle l.62 to

config.action_mailer.perform_deliveries = false

then restart your server and try again. If there's no more hanging (and no mail, that's normal), then correct your smtp parameter, ensure you give the right to your redmine server to discuss with your smtp server, then restore l.62 to its previous state.

Once again (by pity), please consider point 1. >_<

RE: error throws when testing email - Added by dinesh kumar over 11 years ago

I changed to config.action_mailer.perform_deliveries = false
and restarted the server , the result was email was sent successfully !!!
and again changed to config.action_mailer.perform_deliveries = true, the result was (An error occurred while sending mail (execution expired))

i have doubt in configuration

config.action_mailer.smtp_settings = {
:address => "smtp.mail.com",
:port =>465,
:domain => "gmail.com",
:authentication => :login,
:user_name => "",
:password => "xxxxxxxxx",
}
config.action_mailer.perform_deliveries = true

we have used the gmail as SMTP server , the protocol SMTP will support ?
if we need to change the protocol(smtps) in ruby how ?

Note : we have used the gmail as SMTP server and protocol is smtps in our application (mail sending is working ).

RE: RE: error throws when testing email - Added by Thomas Lecavelier over 11 years ago

GMail accept SMTP connection via TLS only. ActionMailer is not TLS capable by default, but there's plenty of doc about changing it. Just follow instructions here, it worked with some redmine users:

There's a new way, simplest, but that I havn't tested yet:

ruby script/plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls

then configure your mailer in config/environment.rb

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_charset = "utf-8" 
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
        :address => "smtp.domain.tld",
        :port => 25,
        :user_name =>'login',
        :password =>'pass',
        :authentication => :login,
        :domain => "domain.tld",
        :tls => true
}
config.action_mailer.perform_deliveries = true

Think that if you mentionned you tried to configure gmail SMTP, you'll get this very answer four days ago...

RE: error throws when testing email - Added by dinesh kumar over 11 years ago

thanks for your guide !!!!!!!!!!!!!!1
it's working !!!!

RE: error throws when testing email - Added by Thomas Lecavelier over 11 years ago

Please, again, consider point 1 >_<

RE: RE: error throws when testing email (Gmail SMTP) - Added by Chris Born over 11 years ago

I have read through this post, and many other found across the web.
In trying to configure Redmine 0.7.2 to use Gmail for email notifications, I continue to get An error occurred while sending mail (execution expired).

I installed the action_mailer_optional_tls plugin, and edited my environment.rb, but there are a number of conflicting implementations, here are a few I have tried without success:

Based on the post in this thread

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_charset = "utf-8" 
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 25,
      :user_name =>'name@mydomain.com',
      :password =>'password',
      :authentication => :login,
      :domain => "mydomain.com",
      :tls => true
}
config.action_mailer.perform_deliveries = true

Based on one found elsewhere

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_charset = "utf-8" 
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 587,
      :user_name =>'name@mydomain.com',
      :password =>'password',
      :authentication => :plain,
      :domain => "mydomain.com" 
}
config.action_mailer.perform_deliveries = true

Yet another permutation

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_charset = "utf-8" 
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 465,
      :user_name =>'name@mydomain.com',
      :password =>'password',
      :authentication => :plain,
      :domain => "mydomain.com",
      :tls => true
}
config.action_mailer.perform_deliveries = true

One other not, a lot of other instructions indicate that the setting in the env file should start like: ActionMailer::Base.server_settings = { But being somewhat new to Ruby, I did not want to change to that since it looks like Redmine specifically looks for config.action_mailer.smtp_settings = {.

Yes, I am using Gmail hosted mail, and the login and sending via SMTP has been verified with a mail client. I have also used ActionMailer in the past on got it to work with the same account. Redmine is the only time I have had issues.

Any ideas would be greatly appreciated. We have been using this awesome tool for a while, and just now have a need for email notifications.

RE: error throws when testing email - Added by Lee Taylor over 11 years ago

Have you tried adding this inside of the parameters of the smtp settings: :expires => 60,

  1. SMTP server configuration
    config.action_mailer.smtp_settings = {
    :address => '127.0.0.1',
    :port => 25,
    :domain => 'domain.com',
    :pop3_auth => {
    :server => 'mail. domain.com',
    :expires => 60,
    :user_name => 'info@ domain.com',
    :password => 'password',
    :authentication => :login
    }
    }

- Lee

RE: error throws when testing email - Added by Fernando Paredes Garcia over 10 years ago

I'm quite happy to use Redmine, and discovered this problem with emails, well, there is also the sendmail way:
http://www.redmine.org/issues/2567
In my particular case, ruby have to run with the right permissions, or will not be able to relay the smtp... so, using sendmail command to use local smtp is they unique alternative by now.

(1-10/10)