# Bug OP-3909 - Reminder mailer fails if assignee is not a user

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-3909

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 10.0.0 |
| Observed in versions |  |
| Sprint | 10.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

**Steps to reproduce:**  
`/usr/bin/openproject run bundle exec rake redmine:send_reminders days=2 RAILS_ENV="production"`

(from https://community.openproject.com/projects/openproject/work\_packages/7693/activity\#activity-9)

**Actual Behavior**  
Fails, if an assignee is not a user (=it is a group)

**Expected Behavior**  
Should send emails to

1.  a user, if the user is the assignee
2.  to all members of a group, if the group is the assignee

**Workaround:**  
Send mails only to users (not groups)  
See `/opt/openproject/app/mailers/user_mailer.rb:474 class DueIssuesReminder`

Replace line 474  
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.active?@  
with  
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.is\_a?(User) && assignee.active?@

This stops failing, but the members of a group are not addressed.
