Project

General

Profile

Sending emails using Gmail from Windows and WEBrick

Added by Edu Garcia about 8 years ago

Hi,

This is my first installation of Redmine and I am not a Ruby or Rails developer. Installed Redmine on Windows and I need it to send e-mail notifications using a (free) Gmail account.

When I try to "Send a test email" I always get the same error:

An error occurred while sending mail (execution expired)

I have followed the instructions here: http://www.redmine.org/projects/redmine/wiki/redmineinstall and then the email configuration here: http://www.redmine.org/projects/redmine/wiki/EmailConfiguration

I installed the RailsInstaller (http://railsinstaller.org/) with Ruby 2.1 (because I had problems with nokogiri and Ruby 2.2). The version of Redmine is 3.2.1.

Edited configuration.yml with this:

...
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  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: "xxxxx@gmail.com" 
      password: "xxxxx" 
...

I tried many variations like putting this section in the "production" part of the file, removing everything else in the file, using port 465, using authentication :login, removing or adding quotes, ... I also checked that there are spaces everywhere and not tabs.

My Gmail account has POP3 and IMAP enabled.

I have the Windows firewall disabled.

I am executing Redmine with this command:

C:\RailsInstaller\redmine-3.2.1>bundle exec rails server webrick -e production

I have looked everywhere and I cannot find where is my problem. Maybe is not possible to use WEBrick to send e-mails.

Any help will be appreciated