Defect #7451

Send email

Added by Luis Serrano Aranda over 6 years ago. Updated about 2 years ago.

Status:ClosedStart date:2011-01-26
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution:Invalid Affected version:

Description

When I create a new issue Redmine not send an email to the person who has been assigned

Capture.JPG (49.2 KB) Luis Serrano Aranda, 2011-01-26 16:23

Capture_2.JPG (40.9 KB) Luis Serrano Aranda, 2011-02-28 12:21

Capture_3.JPG (28.1 KB) Luis Serrano Aranda, 2011-02-28 12:21

Schema.jpg (146 KB) Luis Serrano Aranda, 2011-03-10 11:08

schema_migration.sql (4.39 KB) Luis Serrano Aranda, 2011-03-17 09:00

Shema_Migrations_201111171553.sql - Shema_Migrations (3.89 KB) Laercio Mendonça, 2011-11-17 18:54


Related issues

Related to Redmine - Defect #7400: E-mail notifications are only sent when user watches issue Closed 2011-01-21

History

#1 Updated by Adam DeJardine over 6 years ago

Go to Administration > Settings > Email Notifications. Is "Issue added" checked?

#2 Updated by Luis Serrano Aranda over 6 years ago

Yes

#3 Updated by Adam DeJardine over 6 years ago

And if you go to http://<redmine install path>/admin/test_email does the administrator get an email?

#4 Updated by Luis Serrano Aranda over 6 years ago

Yee with the test redmine sends the email

#5 Updated by Jean-Baptiste Barth over 6 years ago

Last one: does the user (the assignee) have notifications enabled ? If not, this behaviour is normal.
If yes, please provide informations requested at SubmittingBugs and minimal steps to reproduce so that we can confirm it's a defect.
It's probably just a configuration or migration problem on your instance.

#6 Updated by Maxime Pelletier over 6 years ago

I have the same problem after updating to redmine 1.1.0. My user email notification is set to "For any event on all my projects" and I don't receive notification emails. The test email works fine and if I watch an issue I receive notification emails succesfully.
Let me know if you need more information.

#7 Updated by Maxime Pelletier over 6 years ago

Fixed the problem. Looks like I somehow forgot to run the migrations after updating. My bad.

#8 Updated by Luis Serrano Aranda over 6 years ago

How to do the migration? I did what it says on the website must be done to upgrade Redmine

Thanks

#9 Updated by Luis Serrano Aranda over 6 years ago

Hello Maxim could you help me ? Thanos

#10 Updated by Luis Serrano Aranda over 6 years ago

Hello Maxim, could you help me ? Thanks

#11 Updated by Etienne Massip over 6 years ago

Guess he is talking about running rake migrate:db, but you said you did it before ?

#12 Updated by Luis Serrano Aranda over 6 years ago

I've been able to migrate the BBDD and Redmine still send mail

#13 Updated by Luis Serrano Aranda over 6 years ago

I migrated the database but redmine not send e-mails

#14 Updated by Etienne Massip over 6 years ago

  • Category set to Email notifications

In the user profile of the assignee, what are set the "Email notifications" fields with ?

Are you sure the person did not receive the mail (you checked the BCC field) ? :p

#15 Updated by Luis Serrano Aranda over 6 years ago

I try with BCC and witouth and the email dont't work

And this is I attach my email configuration (Capture2.jpg) and the configuration of all the users (Capture 3.jpg)

#16 Updated by Etienne Massip over 6 years ago

What's your redmine version ?

#17 Updated by Luis Serrano Aranda over 6 years ago

Ups sorry 1.1.1

#18 Updated by Etienne Massip over 6 years ago

Did you manage to make it work ?

If not, what's the result of rake db:migrate ?

#19 Updated by Luis Serrano Aranda over 6 years ago

I did not succeed, when I do a migrate Redmine returns nothing. I will review the problem with Aptana and the debugger.

#20 Updated by Etienne Massip over 6 years ago

What do you mean by nothing ?

Did you set RAILS_ENV to production ?
Did you try to run it with the --trace argument ?

#21 Updated by Luis Serrano Aranda over 6 years ago

lserrano@robotica:/var/www/redmine$ sudo rake db:migrate RAILS_ENV=production --trace
(in /var/www/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:migrate
  • Invoke db:schema:dump (first_time)
  • Invoke environment
  • Execute db:schema:dump
    lserrano@robotica:/var/www/redmine$

#22 Updated by Etienne Massip over 6 years ago

What's the type of your users.mail_notification column ?
What do you find in log when creating an issue ?

#23 Updated by Luis Serrano Aranda over 6 years ago

What's the type of your users.mail_notification column ? tinyint(1)
What do you find in log when creating an issue ?

Processing IssuesController#create (for 127.0.0.1 at 2011-03-09 16:32:59) [POST]
Parameters: {"commit"=>"Crear", "project_id"=>"red", "action"=>"create", "authenticity_token"=>"wR52W1Qu9EUY6397mYrgNPErhqu7uxet7ekKc5QSRYo=", "issue"=>{"start_date"=>"2011-03-09", "estimated_hours"=>"", "priority_id"=>"4", "parent_issue_id"=>"", "fixed_version_id"=>"1", "done_ratio"=>"0", "assigned_to_id"=>"3", "subject"=>"Test", "tracker_id"=>"2", "due_date"=>"", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}, "screenshot"=>{"name"=>"screenshot", "content"=>"", "description"=>""}}}
Sending email notification to:
Redirected to https://127.0.0.1/issues/2518
Completed in 148ms (DB: 93) | 302 Found [https://127.0.0.1/projects/red/issues]

Processing IssuesController#show (for 127.0.0.1 at 2011-03-09 16:32:59) [GET]
Parameters: {"action"=>"show", "id"=>"2518", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 311ms (View: 268, DB: 24) | 200 OK [https://127.0.0.1/issues/2518]

Processing AdminController#index (for 127.0.0.1 at 2011-03-09 16:33:02) [GET]
Parameters: {"action"=>"index", "controller"=>"admin"}
Rendering template within layouts/admin
Rendering admin/index
Completed in 22ms (View: 16, DB: 4) | 200 OK [https://127.0.0.1/admin]

Processing LogsController#index (for 127.0.0.1 at 2011-03-09 16:33:03) [GET]
Parameters: {"action"=>"index", "controller"=>"logs"}
Rendering template within layouts/admin
Rendering logs/index
Completed in 33ms (View: 28, DB: 2) | 200 OK [https://127.0.0.1/logs]

#24 Updated by Etienne Massip over 6 years ago

Ok, tinyint is not good, should be a varchar, something must have gone wrong in your migration.

#25 Updated by Etienne Massip over 6 years ago

You can try to run the missing migration with rake db:migrate:up VERSION=20100129193402

#26 Updated by Etienne Massip over 6 years ago

Actually, this should not work as migrations can't be ran twice.

Just an idea : maybe you could copy db/migrate/20100129193402_change_users_mail_notification_to_string.rb to, e.g., db/migrate/99990129193402_change_users_mail_notification_to_string.rb, run migrations then remove the new 99990129193402 record from table schema_migration ?

#27 Updated by Luis Serrano Aranda over 6 years ago

After make rake db:migrate:up VERSION=20100129193402 redmine dont'send email and the log return:

The following error occured while sending email notification: "550 <>, Recipient unknown

#28 Updated by Luis Serrano Aranda over 6 years ago

Ant the email test works

#29 Updated by Etienne Massip over 6 years ago

Could you do what explained in note 26 then check your users.mail_notification column data type ?

#30 Updated by Luis Serrano Aranda over 6 years ago

If a make the up the redmain not send emails and the user.mail_notification is a VARCHAR (STRING)

#31 Updated by Etienne Massip over 6 years ago

Luis Serrano Aranda wrote:

If a make the up the redmain not send emails and the user.mail_notification is a VARCHAR (STRING)

Ok, now you column has the right format.
What's the value of the last record of the schema_migration table ?

#32 Updated by Luis Serrano Aranda over 6 years ago

The value of the last record is 99

In the development environment I have make a test, load the redmine 1.1.2 and load the default BBDD

(With the same email.yml) and the email test return the 550 error ¿?

#33 Updated by Etienne Massip over 6 years ago

1) I guess you've chosen to display only the first 100 records, hence the 99, you have to display all records
=)

2) what's on in log when you send a test e-mail on your production environment (not the test one) ?

#34 Updated by Luis Serrano Aranda over 6 years ago

Not not I have displayed all the record I attach the schema capture

#35 Updated by Luis Serrano Aranda over 6 years ago

Not not I have displayed all the record I attach the schema capture

#36 Updated by Luis Serrano Aranda over 6 years ago

Luis Serrano Aranda wrote:

Not not I have displayed all the record I attach the schema capture

#37 Updated by Luis Serrano Aranda over 6 years ago

2) The test works

#38 Updated by Luis Serrano Aranda over 6 years ago

any suggestions?

#39 Updated by Etienne Massip over 6 years ago

Luis Serrano Aranda wrote:

Not not I have displayed all the record I attach the schema capture

This is not possible. Could you please attach the full schema_migrations contents ?

#40 Updated by Luis Serrano Aranda over 6 years ago

The sql export ?

#41 Updated by Luis Serrano Aranda over 6 years ago

Now I have a new problem... when I make a new issue if I put watchers (after the creation of the issue) redmine returns the message translation missiong: es, field_watcher_users no es valido.

Etienne thanks for you job and your help

#42 Updated by Etienne Massip over 6 years ago

Luis Serrano Aranda wrote:

The sql export ?

Yes, please.

#43 Updated by Luis Serrano Aranda over 6 years ago

Etienne any news ?
comparethe tables of my database current (updated) with a new and empty database of the version 1.1.2?

Thanks

#44 Updated by Etienne Massip over 6 years ago

I just say that you last schema_migrations record can't be 99 (at least, should not be) since 99 is a very old migration (see source:trunk/db/migrate, migrations are run by rake db:migrate in their file name alphabetic order).

So, please check twice or / and attach here the contents of the schema_migrations table ?

Edit : numeric order :/

#45 Updated by Luis Serrano Aranda over 6 years ago

Ups I thought I had attached, sorry

#46 Updated by Etienne Massip over 6 years ago

Well, your db is missing migration 20100129193402 and only this one.

Please do the following :
  1. copy file db/migrate/20100129193402_change_users_mail_notification_to_string.rb to db/migrate/99990129193402_change_users_mail_notification_to_string.rb
  2. run rake db:migrate RAILS_ENV=production --trace
  3. If no error then :
    1. update the new 99990129193402 record from table schema_migration to the value 20100129193402
    2. remove the newly created file db/migrate/99990129193402_change_users_mail_notification_to_string.rb so that it can't be run again accidentally

#47 Updated by Luis Serrano Aranda over 6 years ago

...And finally works.

A lot of thanks !!!!

Very good job !!!

#48 Updated by Luis Serrano Aranda over 6 years ago

  • Status changed from New to Resolved

#49 Updated by Etienne Massip over 6 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Nice :)

#50 Updated by Laercio Mendonça almost 6 years ago

Etienne ,

I'm having the same problem in my redmine to control the activities of my company.
my schema migration in this Annex, all settings are displayed as standard.
The problem is exactly the same, but could not apply the solution presented.

Someone could help me.

Etienne Massip wrote:

Well, your db is missing migration 20100129193402 and only this one.

Please do the following :
  1. copy file db/migrate/20100129193402_change_users_mail_notification_to_string.rb to db/migrate/99990129193402_change_users_mail_notification_to_string.rb
  2. run rake db:migrate RAILS_ENV=production --trace
  3. If no error then :
    1. update the new 99990129193402 record from table schema_migration to the value 20100129193402
    2. remove the newly created file db/migrate/99990129193402_change_users_mail_notification_to_string.rb so that it can't be run again accidentally

#51 Updated by Etienne Massip almost 6 years ago

  • Assignee deleted (Etienne Massip)

#52 Updated by Etienne Massip over 4 years ago

  • Status changed from Reopened to Needs feedback

Laercio, did you eventually manage to make it work?

#53 Updated by Jan Niggemann (redmine.org team member) about 2 years ago

  • Status changed from Needs feedback to Closed

Also available in: Atom PDF