Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New and updated appointments are not sent via e-mail #5706

Closed
stoneubi opened this issue Jan 22, 2024 · 50 comments · Fixed by nextcloud/server#44938
Closed

New and updated appointments are not sent via e-mail #5706

stoneubi opened this issue Jan 22, 2024 · 50 comments · Fixed by nextcloud/server#44938
Assignees
Labels
0. to triage Pending approval or rejection bug

Comments

@stoneubi
Copy link

Steps to reproduce

  1. Update NC to version 28.0.1
  2. Update Calendar to Version 4.6.4
  3. Login to NC and create a new calendar entry / appointment and invite some user or external attendee via e-mail

Expected behavior

The newly created calendar entry should be sent via e-mail to the invited attendee.

Actual behaviour

No e-mail is sent. Also no e-mails are sent for changed calendar entries.

Only if a newly created entry will be cancelled an e-mail with the cancellation is sent.

Regardless if you create the calendar item directly in nextcloud calendar app or via DAVx5 or Thunderbird calendar, the result is the same. No e-mail with the invitation are sent any more. This worked create before the last update to calendar version 4.6.4.

Calendar app version

4.6.4

CalDAV-clients used

No response

Browser

No response

Client operating system

No response

Server operating system

No response

Web server

None

Database engine version

None

PHP engine version

None

Nextcloud version

No response

Updated from an older installed version or fresh install

None

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

No response

@stoneubi stoneubi added 0. to triage Pending approval or rejection bug labels Jan 22, 2024
@Markoise
Copy link

I can understand the problem very well.
Especially if invited people have a GMail address.
Likewise, no emails will be sent if the appointment is created with an Android calendar app.
At least it works in the Nextcloud Calendar WebGUI as long as no GMail address is invited.

@stoneubi
Copy link
Author

Any update on this issue!

@Alex13280815
Copy link

Same here, fresh install on Debian12, PHP 8.2, MariaDB, Apache, NC 28.0.2.

@grosjo
Copy link

grosjo commented Feb 14, 2024

Further to that, creating an event via CalDav (Davx here), does not trigger sending an email to the invited

@miaulalala
Copy link
Contributor

Can you check your logs for any errors?
Can you also check your Mailer settings for your instance?

@miaulalala miaulalala self-assigned this Feb 14, 2024
@Alex13280815
Copy link

Alex13280815 commented Feb 14, 2024

nextcloud.log
Email Test is OK.

@miaulalala
Copy link
Contributor

Nothing in the logs. Can you enable debug mode and try again?

@stoneubi
Copy link
Author

Today I downloaded Google Calendar on my Android device and I created a new appointment with invited attendees and nextcloud calendar sent the expected invitations through email. If I do the same things in my Android calendar app called fossify calendar 1.0.2 (new version of simple calendar app) and start Davx5 to synchronize with my nextcloud, no invitations will be sent. Very strange.

@stoneubi
Copy link
Author

As I can see, a new version of Davx5 will be released with the next hours. Version davx5-ose-4.3.13-ose-release.apk.

As Google calendar works maybe this bug is linked to Davx5?

On the other hand the invitations are also not sent if the calendar entry has been created directly in nextcloud itself.

@Alex13280815
Copy link

Nothing in the logs. Can you enable debug mode and try again?

nextcloud (2).log
I give my best. :-)

@grosjo
Copy link

grosjo commented Mar 4, 2024

This is really a critical bug for a calendar not to sent invites.

How can I help ?

@miaulalala
Copy link
Contributor

I can't reproduce - invitations get sent. Is there anything special about the attendee email addresses? I've tried with both other users and external attendees and the emails get sent.

Are the calendar you're trying to invite someone to special? Calendars that have been shared / are shared with you?

@Markoise
Copy link

Markoise commented Mar 5, 2024

Since Nextcloud 28.0.3 the emails have been sent again.

But it still remains unpleasant with Gmail addresses.
If you send an appointment to a GMail address, the person can accept the appointment using the Nextcloud "Accept" link, but it will not be recorded as accepted in the calendar. Changes to appointments are entered as a new appointment.
But that's probably a Google problem, right?

Equally problematic:
If I receive an invitation (in K9 email) I cannot accept the appointment. Even in the Nextcloud Mail app, appointments cannot be entered in the calendar.

Calendars can now be subscribed to again.

Thank you!!

@miaulalala
Copy link
Contributor

but it will not be recorded as accepted in the calendar.

you mean in the associated gmail calendar?
No, it will not as the link leads to the nextcloud instance which is not connected to google calendar.

For any invitation you accept via link, if you don't use the integrated iMIP service (native accept/decline buttons in your clients) only the nextcloud instance calendar will be updated; unless you have an email address that is associated with a calendar principal on this nextcloud instance, then it will work. That is just how the protocol works.

@Markoise
Copy link

Markoise commented Mar 5, 2024

I mean that the person otherwise has no opportunity to accept the appointment.
Any appointment request from another calendar provider can be accepted using GMail and added to Google Calendar.

Unfortunately, there is no appointment request from the Nextcloud calendar. Only the ICS attachments.

Now I'm not sure whether this is a Google problem or a Nextcloud problem.

Sorry for my bad english. 😉

@Markoise
Copy link

Sometimes emails are sent, sometimes not.

@miaulalala
Copy link
Contributor

Can you tell me step by step what happens?

So:

  1. Create calendar event in Nextcloud
  2. Invite someone with a gmail address
  3. ???

and what you expect to happen, too? Maybe I can get a clearer picture what you're looking for and where the issue is.

@Markoise
Copy link

Steps for new appointment:

  1. Create an appointment in the NC calendar (also ETAR, Google Calendar app).
  2. Invite participants name@gmail.com
  3. Sometimes an email is sent, sometimes not.

Steps for changing an appointment:

  1. Change the appointment in the NC calendar (also ETAR, Google Calendar app).
  2. Sometimes an email is sent, sometimes not.

When an email is sent, there are 1 - 2 .ICS files attached. The invitee's different mail client (Gmail App, K-9) sometimes interprets the invitation as such and offers "accept" / "reject". But sometimes not.

Expectation:
name@gmail.com receives an email with an appointment invitation, which can be responded to with “accept” or “reject”.

@miaulalala
Copy link
Contributor

Can you tell me if you use Ajax Cron, WebCron or Cron? You can find that in your admin settings in "Basic Settings".

@Markoise
Copy link

grafik

I'm using CRON as recommended

@miaulalala
Copy link
Contributor

miaulalala commented Mar 21, 2024

Steps for changing an appointment:

1. Change the appointment in the NC calendar (also ETAR, Google Calendar app).

2. Sometimes an email is sent, sometimes not.

The second one might be down to what changed about the event (let's please call them events, appointments are another feature of the calendar app and it confuses me 😅 ). There's something called a "significant change" in calendaring, so if you only changed the title of an event, that is not enough to trigger an update email. If you change the date and / or time, that is.

Are there any special chars in those gmail email addresses you're sending too? Might be related to #2149 or if you're using Gmail for SMTP, it might be related to this: #3681

@Markoise
Copy link

Markoise commented Mar 21, 2024

Ok, I understand. I have now tried again.

  1. created an event in the NC calendar
  2. invited name@gmail.com
  3. an invitation arrived, which I was able to accept
  4. moved the event in the NC calendar to another time
  5. an update arrived and could be accepted
  6. renamed event in the NC calendar
  7. event will not be renamed for someone else
  8. location in the appointment changed
  9. the location is not changed for another person
  10. event moved again.
  11. the appointment update was sent with a new name and could be accepted.

Unfortunately, it is not good that points 6 and 8 are not updated for the invited persons. This is because when a renamed event is canceled, it is not removed from the calendar.

The K9 Mail app does not recognize the invitation as an event. The GoogleMail app, on the other hand, does.

I don't know why it suddenly works now, but there was a recent update to the NC calendar. 🤷‍♂️

I will continue to monitor this. Maybe I can switch to Nextcloud completely soon.

@Markoise
Copy link

It seems that mail is only sent when you create an event in the NC calendar. But not in an Android app like ETAR or the Google Calendar app.

@miaulalala
Copy link
Contributor

miaulalala commented Mar 21, 2024

It seems that mail is only sent when you create an event in the NC calendar. But not in an Android app like ETAR or the Google Calendar app.

How did you connect your Nextcloud Calendar to your Google Calendar App? Same for ETAR (although Ive never used that one myself).

As for the significant changes, the RFC defines the following properties that trigger a significant change:

"DTSTART"
"DTEND"
"DUE"
"RDATE"
"RRULE"
"EXDATE"
"EXRULE"
"STATUS"

The location is a CAN but not a MUST for the event. It's definitely worth a discussion if that should trigger an event.

The K9 Mail app does not recognize the invitation as an event.

That's very likely a K9 issue. We do set the correct Mail headers for Mail Clients to parse the invitation data.

@Markoise
Copy link

I have DAVx5 installed on my smartphone, which allows me to see and edit the calendars in Google Calendar and ETAR.

I think it would be good if the change of location triggered information. It is equally important if the title of the event and a comment are changed.

This is also the case with standard calendars (Outlook/Exchange, Google Calendar, etc.).

@Markoise
Copy link

I need to make a correction.

  1. create event in the NC calendar and invite name@gmail.com
  2. event invitation is sent and accepted
  3. event is moved to another time in the NC calendar
  4. event update is sent to name@gmail.com.
  5. event update is accepted
  6. event is still displayed in the Google calendar at the old time

This means that the event update is not forwarded correctly.

I suggest you try this out for yourself. You will see that it does not work correctly.

@miaulalala
Copy link
Contributor

I need to make a correction.

1. create event in the NC calendar and invite [name@gmail.com](mailto:name@gmail.com)

2. event invitation is sent and accepted

3. event is moved to another time in the NC calendar

4. event update is sent to [name@gmail.com](mailto:name@gmail.com).

5. event update is accepted

6. event is still displayed in the Google calendar at the old time

This means that the event update is not forwarded correctly.

I suggest you try this out for yourself. You will see that it does not work correctly.

is this a NC calendar that was added to google with DavX5? Or is it a Google calendar?

@Markoise
Copy link

is this a NC calendar that was added to google with DavX5? Or is it a Google calendar?

No, this is the event that was created by the invitation in Google Calendar.
Or what do you mean exactly?

@miaulalala
Copy link
Contributor

You updated an event. You accepted an event. Which calendar did you store the accepted event in - a calendar created and managed by Google Calendar, or a calendar created and managed by Nextcloud that is accessible for you on your phone via DavX5.

@Markoise
Copy link

The accepted event is in someone else's Google Calendar.

I think it has to do with when the content of an appointment is changed. If the title, location and/or description changes and then the time, it no longer works.

The same happens when someone else sends me an event. Postponements are implemented, but if the content of the event changes, the error also occurs there.

@miaulalala
Copy link
Contributor

The accepted event is in someone else's Google Calendar.

I think it has to do with when the content of an appointment is changed. If the title, location and/or description changes and then the time, it no longer works.

The same happens when someone else sends me an event. Postponements are implemented, but if the content of the event changes, the error also occurs there.

But the one that is supposed to do the updating is Google Calendar, right? If so there's nothing we can do about that.

@Markoise
Copy link

No. The changes are made in the Nextcloud calendar.
This is also where I created the event.
I suspect that if the event title and/or location is changed, no more emails will be sent.

At least that's how it looks.

@stoneubi
Copy link
Author

To my understanding, this has nothing to do with Google calendar.

My setup is latest nextcloud and latest calendar app in nc.

Steps to reproduce:

  • I created an event with invited attendees (no gmail address) on my Android device with fossify calendar app
  • Synced it via latest davx5 app to nc
  • No invitation email was sent

If I do exactly the same on my Android device using Google calendar app (no Google account), the expected invitation email gets sent.

Screenshot_2024-03-24-18-00-01-19_69738a090b59888d6f9e64a3ebfe2c88.jpg

I wonder if this has something to do with nc calendar app or fossify calendar app.

In the past, let's say 2 months ago, this was working like charm.

Thank you
Stoneubi

@miaulalala
Copy link
Contributor

Possibly related to nextcloud/server#41084

@rcwschaller
Copy link

There are (at least) two separate issues discussed here:

I believe this discussion would greatly benefit if we would have ICS files of the events (exported from nextcloud or from the email attachments) for the steps of the reproduction section where it worked or did not work as expected.

@Markoise
Copy link

I would have an ICS file. Initially I was able to invite a GMail contact to it. It was also possible to reschedule an appointment. If I now postpone this appointment, no notification is sent.

I have only "renamed" the email addresses because I don't want these addresses to be public.

If you look at the file in an editor, you will notice that the mail address is wrapped in line 38. I don't know whether this plays a role or is related to the export from the NC calendar.

termin_export.zip

@stoneubi
Copy link
Author

Can you please let me know how I can generate ics files using Android device with Google calendar app and davx5.

So I can compare the non working ics with the working ics files.

Thank you
Stoneubi

@Markoise
Copy link

Can you please let me know how I can generate ics files using Android device with Google calendar app and davx5.

So I can compare the non working ics with the working ics files.

Thank you Stoneubi

You can click here in your Nextcloud Calendar to export this event.

grafik

@stoneubi
Copy link
Author

Ok, I will create two same events and will compare the ics files.

To my understanding I think Google calendar app on Android and e.g. fossify calendar app on Android are creating the events in a different way. As mentioned, events created with Google calendar app causes nc calendar do send the email invitation. So I wonder if for debug reasons the log level from davx5 my show different data for the same calendar event.

@stoneubi
Copy link
Author

Here are my results - I created two same events on my android smartphone with two different apps.

Google Calendar app on android device -> the inviation e-mail was sent:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.3.15-ose ical4j/3.2.14 (com.google.android.calendar)
BEGIN:VTIMEZONE
TZID:Europe/Vienna
LAST-MODIFIED:20230104T023643Z
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20240326T190233Z
UID:5acc825f-f527-415a-bd68-09b7468cbcb7
SUMMARY:Test created in Google calendar app on Android
DTSTART;TZID=Europe/Vienna:20240407T130000
DTEND;TZID=Europe/Vienna:20240407T140000
ORGANIZER:mailto:my-email-adress@yyyyyyyy.com
ATTENDEE;RSVP=TRUE;SCHEDULE-STATUS=1.1:mailto:invited_person@yyyyyyyy.com
ATTENDEE;RSVP=TRUE;CN=Kalender;PARTSTAT=ACCEPTED:mailto:my-email-adress@yyyyyyy
y.com
END:VEVENT
END:VCALENDAR

fossify calendar app on android -> no inviation e-email was sent:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.3.15-ose ical4j/3.2.14 (org.fossify.calendar)
BEGIN:VTIMEZONE
TZID:Europe/Vienna
LAST-MODIFIED:20230104T023643Z
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20240326T190054Z
UID:df3cc969-67d3-4995-b966-9ae5297774d5
SUMMARY:Test created in fossify calendar app on Android
DTSTART;TZID=Europe/Vienna:20240407T130000
DTEND;TZID=Europe/Vienna:20240407T140000
STATUS:CONFIRMED
ORGANIZER:mailto:my-email-adress@yyyyyyyy.com
ATTENDEE;RSVP=TRUE;CUTYPE=UNKNOWN;PARTSTAT=NEEDS-ACTION;SCHEDULE-STATUS=1.0
:mailto:invited_person@yyyyyyyy.com
END:VEVENT
END:VCALENDAR

Differences:

<style> p.Normal {margin:0.0pt; margin-top:0.0pt; margin-bottom:0.0pt; margin-left:0.0pt; margin-right:0.0pt; text-indent:0.0pt; font-family:"Basic Sans"; font-size:10.0pt; color:Black; font-weight:normal; } </style>
BEGIN:VCALENDAR BEGIN:VCALENDAR
VERSION:2.0 VERSION:2.0
PRODID:DAVx5/4.3.15-ose ical4j/3.2.14 (org.fossify.calendar) PRODID:DAVx5/4.3.15-ose ical4j/3.2.14 (com.google.android.calendar)
BEGIN:VTIMEZONE BEGIN:VTIMEZONE
TZID:Europe/Vienna TZID:Europe/Vienna
LAST-MODIFIED:20230104T023643Z LAST-MODIFIED:20230104T023643Z
BEGIN:DAYLIGHT BEGIN:DAYLIGHT
TZNAME:CEST TZNAME:CEST
TZOFFSETFROM:+0100 TZOFFSETFROM:+0100
TZOFFSETTO:+0200 TZOFFSETTO:+0200
DTSTART:19810329T020000 DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT END:DAYLIGHT
BEGIN:STANDARD BEGIN:STANDARD
TZNAME:CET TZNAME:CET
TZOFFSETFROM:+0200 TZOFFSETFROM:+0200
TZOFFSETTO:+0100 TZOFFSETTO:+0100
DTSTART:19961027T030000 DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD END:STANDARD
END:VTIMEZONE END:VTIMEZONE
BEGIN:VEVENT BEGIN:VEVENT
DTSTAMP:20240326T190054Z DTSTAMP:20240326T190233Z
UID:df3cc969-67d3-4995-b966-9ae5297774d5 UID:5acc825f-f527-415a-bd68-09b7468cbcb7
SUMMARY:Test created in fossify calendar app on Android SUMMARY:Test created in Google calendar app on Android
DTSTART;TZID=Europe/Vienna:20240407T130000 DTSTART;TZID=Europe/Vienna:20240407T130000
DTEND;TZID=Europe/Vienna:20240407T140000 DTEND;TZID=Europe/Vienna:20240407T140000
STATUS:CONFIRMED ORGANIZER:mailto:my-email-adress@yyyyyyyy.com
ORGANIZER:mailto:my-email-adress@yyyyyyyy.com ATTENDEE;RSVP=TRUE;SCHEDULE-STATUS=1.1:mailto:invited_person@yyyyyyyy.com
ATTENDEE;RSVP=TRUE;CUTYPE=UNKNOWN;PARTSTAT=NEEDS-ACTION;SCHEDULE-STATUS=1.0 ATTENDEE;RSVP=TRUE;CN=Kalender;PARTSTAT=ACCEPTED:mailto:my-email-adress@yyyyyyy
:mailto:invited_person@yyyyyyyy.com y.com
END:VEVENT END:VEVENT
END:VCALENDAR END:VCALENDAR

@rcwschaller
Copy link

Only regarding relation to issue #41084:

  • Example by @Markoise: This is a SEQUENCE=10 iteration of this event. Although it not clear to me, if this is the ICS before or after the update which does not sent out the email, it is safe to say, that it is unrelated to issue 41084 as both 9->10 and 10->11 would still trigger an email with the pre-bugfix code as long as it is an update to e.g. the starting time.
  • Examples by @stoneubi: Both of his examples are event creations, which - as mentioned earlier - are entirely unrelated to the bugfix in issue 41084.

Sorry that I can't be more of a help here.

@flortsch
Copy link

flortsch commented Mar 28, 2024

I installed the Fossify calendar app on my phone and tested it myself while debugging through our Nextcloud instance. The reason Nextcloud does not send an invite is that it thinks the invited attendee is a room or resource. This is due to CUTYPE being set to UNKNOWN. If this is comming from the Fossify calendar app (which I think is the case - see also your provided ics file) then it's definitely a bug in the app. See attached screenshots from the debugging.

Bildschirmfoto vom 2024-03-28 09-05-50

Bildschirmfoto vom 2024-03-28 09-06-48

@flortsch
Copy link

Question to Nextcloud devs: is this expected behavior or is the Nextcloud check isRoomOrResource maybe too strict for CUTYPE=UNKNOWN and should the check be more relaxed?

@tcitworld
Copy link
Member

See nextcloud/server#40876. Maybe we could remove UNKNOWN from here @miaulalala, unless there's specific cases with UNKNOWN CUTYPESs we need to exclude?

@flortsch
Copy link

flortsch commented Apr 4, 2024

Found a second check on the UNKNOWN CUTYPE here: https://github.com/nextcloud/server/blob/7dad12ef75856c1f73cf744f7c154da20d019498/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php#L257.

It's unrelated to this issue as the code path uses an IMailer instance instead of the above linked EmailProvider but the check in EmailProvider might result in other notification emails not being sent for this CUTYPE.

@miaulalala
Copy link
Contributor

miaulalala commented Apr 19, 2024

See nextcloud/server#40876. Maybe we could remove UNKNOWN from here @miaulalala, unless there's specific cases with UNKNOWN CUTYPESs we need to exclude?

Yeah we could, that would be fine I think.

The original code was introduced with nextcloud/server@bcce568 - I oriented myself on that but the RFC doesn't specify that the CU type UNKNOWN is for a thing.

@stoneubi
Copy link
Author

Hi,

I upgraded to version 29.0.1. and I happy to report that this bug is fixed in my setup - Android phone, fossify calendar, davx5 sync to nextcloud.

Thank you very much 👍😊
Stoneubi

@Markoise
Copy link

Funny. I still have the same problem with the Fossify Calendar. But otherwise it looks really good now.

Unfortunately, I can't accept appointment confirmations with K9 Mail, but that's probably due to K9 Mail.

@stoneubi
Copy link
Author

I also use k9 and in the invitation email there is the ics file and a link to the online nextcloud invitation answer form.

K9 cannot handle ics files and I also have to use the link button.

But if I open the same email in outlook I can accept or decline directly in the email / calendar invitation.

@Markoise
Copy link

But if I open the same email in outlook I can accept or decline directly in the email / calendar invitation.

Yes, it now works without any problems with Outlook, emClient, FairEmail.

Thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants