# Bug OP-19058 -  iCal RSVP response not processed due to case-sensitive email comparison in HandleICalResponseService

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  – 2026-03-17 |
| Priority | High |
| Module | Modules and project features / Email notifications, Modules and project features / Calendar, Modules and project features / Meetings |
| Target versions | 17.3.0 |
| Observed in versions | 17.1.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.1.x |
| 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 | Mir Bhatia |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

**Steps to reproduce:**

1.  Configure incoming email via IMAP (Docker environment variables)
    
2.  Create a meeting in OpenProject and invite a participant whose email address is stored in lowercase in OpenProject (e.g. `user@example.com`)
    
3.  The participant receives the meeting invitation with an ICS attachment via email
    
4.  The participant accepts the meeting in Microsoft Outlook (Exchange Server)
    
5.  Exchange sends a REPLY email with a `text/calendar` attachment (METHOD:REPLY) back to the configured IMAP mailbox
    
6.  Wait for the IMAP cron to process the incoming email (or trigger manually via `rake redmine:email:receive_imap`)
    

**What is the buggy behavior?**

The participation status is not updated. It remains at &quot;Keine Antwort&quot; / &quot;needs action&quot; in the meeting sidebar.

The Rails log shows: \[iCal Meeting Response\] No attendee found for user user@example.com in event &lt;UID&gt;

The root cause is in `app/modules/meeting/app/services/all_meetings/handle_ical_response_service.rb`. The `attendee` method performs a case-sensitive string comparison:  
def attendee(event)  
&nbsp;event.attendee.find { it.value\_ical == &quot;mailto:#{user.mail}&quot; }  
end

Microsoft Exchange preserves the original case of the email address in the iCal REPLY (e.g. `MAILTO:User@Example.com`), while OpenProject stores user emails in lowercase (e.g. `user@example.com`). The comparison `"mailto:User@Example.com" == "mailto:user@example.com"` evaluates to `false`, so the attendee is not found and the status update is silently skipped.

**What is the expected behavior?**

The email comparison should be case-insensitive, consistent with RFC 5321 and consistent with how OpenProject handles email matching elsewhere (e.g. `User.find_by_mail` uses `LOWER()`).

The participation status should be updated to &quot;accepted&quot;, &quot;declined&quot;, or &quot;tentative&quot; depending on the iCal PARTSTAT value, regardless of the email address casing.

Suggested fix:  
def attendee(event)  
 event.attendee.find { it.value\_ical.downcase == &quot;mailto:#{user.mail.downcase}&quot; }  
end

**Logs: W, \[2026-03-17T16:36:52.018131\] WARN -- : \[iCal Meeting Response\] No attendee found for user bot1.p\*\*\*\*@sp\*\*\*\*r.de in event 9f7d3fe3-fc37-45fb-900d-771eeb13049f@pm.\*\*\*\*.de**

**The iCal REPLY from Exchange contains:**  
**ATTENDEE;PARTSTAT=ACCEPTED;CN=Bot1** [**P\*\*\*\*:MAILTO:Bot1.\*\*\*\*\*@sp\*\*\*\*r.de**](plemeo:MAILTO:Bot1.Plemeo@sperrer.de)

While the OpenProject user email is stored as: `bot1.p*****@s*****r.de`

**Environment information:**

*   **OpenProject installation type:** Docker All-in-one container
    
*   **OpenProject version:** 17.1.3
    
*   **Browser:** N/A (backend processing, no browser involved)
    
*   **Operating System:** Linux (Debian-based, Docker host)
    
*   **Language:** German (de)
