5

I am sending meeting invitation mail via PHP to Outlook. Following code, i am using

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20150501T080000Z
DTEND:20150502T090000Z
DTSTAMP:20150511T075116Z
ORGANIZER;CN=Jass:mailto:jaspreet@anlita.se
UID:12345678123
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=Sample:mailto:sample@test.com
DESCRIPTION:Complete event on http://www.sample.com/get_event.php?id=12345678
LOCATION: India
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:TESTING timezones
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Problem

When user receives mail then instead of accept and decline, it is showing Not current and when i click on it then it shows alert "This meeting request is out of date and will now be deleted"

What is the exact reason? I am not able to figure it out.

halfer
  • 19,824
  • 17
  • 99
  • 186
Jass
  • 3,345
  • 3
  • 24
  • 41
  • Prior to deletion, does it indicate what time it thinks the meeting is? Maybe the date/time fields are not in the correct format? Is the time set correctly on the Outlook computer? Might be worth trimming down the fields in that request to bare essentials, in case any are upsetting Outlook. Also, check your newline format. – halfer Apr 11 '15 at 12:07
  • With same code, it is correctly receiving on other emails like yahoo and gmail but only problem is in outlook – Jass Apr 11 '15 at 12:13
  • Does DTSTAMP effect it? – Jass Apr 11 '15 at 12:33
  • I'm afraid I've no idea, not used vcards. Worth looking into, though. – halfer Apr 11 '15 at 12:42
  • Is there already an appointment with the UID (12345678123)? Have you tried to delete all appointments from your Calendar folder and then send this invitation? – Dmitry Streblechenko Apr 11 '15 at 19:55
  • Also, why does DTSTAMP point to a date a month into the future (May 2015)? – Dmitry Streblechenko Apr 11 '15 at 19:57
  • @Dmitry Streblechenko Your suggestion worked for me. Thanks. Now Please answer so that i can accept your answer. – Jass Apr 13 '15 at 03:58

2 Answers2

1

You probably already have an event with the same UID in your calendar:

UID:12345678123

Short answer: always generate a globally unique UID if this is a brand new, uncorelated event

Long answer: When an invitation is received via email for an event that already exists, the client needs to compare its existing copy against the received one based on:

  1. the SEQUENCE number
  2. the DTSTAMP property

If the update received is older than the event on the client side, it is discarded.

So when generating an update, if the update to the event is minimal, one can just use a later DTSTAMP. If the change is significant enough (e.g. DTSTART change), the SEQUENCE number must be increased.

See https://www.rfc-editor.org/rfc/rfc5546#section-2.1.4

Community
  • 1
  • 1
Arnaud Quillaud
  • 4,420
  • 1
  • 12
  • 8
1

A couple of things:

  1. Make sure an appointment with the same UID 12345678123) does not exist in your Calendar folder.

  2. Make sure DTSTAMP does not contain a date in the future.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78