1

I found several SO answers on how to send appointments for outlook or ics friendly calendars using php.

What I would like to know is is there a way to programatically find out whether a user is using a ics friendly calendar or outlook and respond accordingly?

Using PHP.

Or is there a way to send out an appointment that will look okay no matter what is the recipient calendar?

We can assume that the non-ics friendly calendar is a outlook 2003.

UPDATE

My plan is this:

  1. a user login to a page (therefore my webapp knows the user's email address associated with her calendar assuming it's a google calendar)
  2. the user fills in the event details under remind me ... and the date and time accordingly.
  3. my webapp then automatically send a ics invite or whatever invite for non ics friendly calendar.

I am aware of how to send ics invite using PHP and for outlook using PHP.

My question is :

  1. is there a way to detect the calendar type? because my web app is unable to know in advance.

  2. is there a way to send the invite without knowing the type? e.g. send both the ics and non ics invite? Something else more elegant perhaps?

if the answer is positive for Q2, then I don't need to care about detection.

enter image description here

Community
  • 1
  • 1
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
  • .ics is universal format for calendar invitation.So, you should go with .ics . – sandeepsure Oct 26 '15 at 11:24
  • What about those very old outlook calendars like 2003? – Kim Stacks Oct 26 '15 at 11:26
  • I deleted my answer as I realized I jumped the gun with an assumption - by *"send appoints for outlook or ics friendly calendars"* do you mean a process that involves sending an email to these clients as described [here](http://stackoverflow.com/questions/461889/sending-outlook-meeting-requests-without-outlook)? If not, can you edit your question to describe how these appointments get added? Is a web browser involved somehow or just pure PHP? – HPierce Oct 30 '15 at 13:54
  • On a Web form, user key in a date and time. Press submit sent to a .php file which takes the date and time to create an appointment on a designated user calendar. – Kim Stacks Oct 30 '15 at 14:01
  • @KimStacks Ok - but that doesn't clarify anything though. How does your PHP script interface with a user's calendar? And how is a calendar designated? – HPierce Oct 30 '15 at 21:12
  • @HPierce I have edited the question. Let me know if there is still more doubts remaining so I can work on improving the question. – Kim Stacks Nov 01 '15 at 02:58

1 Answers1

1

You've linked to two separate processes in your question for providing the event to users.

The first, responds to an HTTP request and returns a response containing only the .ics file. This means a user must then either download the file and manually add it to their calendar, or provide the URL within their client. This means that your users must know how to use these files - which is a bad assumption to rely on if you ask me.

The second solution you linked to involves creating a carefully crafted email to send to Outlook users. Outlook presents the email as an invitation to the user and adds it to their calendar. This is a better solution, but it doesn't help non-Outlook users very much.


A third process might better fit your situation: sending a complete .ics file as an attachment with an email.

According to Wikipedia and another external site, Outlook began supporting .ics files since Outlook 2000:

After Outlook 2000, you were able to import and export calendar content with .ics-formatted files.

And both Gmail and Outlook have built in features to help users add an event to their calendars if an .ics file has been attached. As a fallback, if a user's email client doesn't support .ics files (as in, the client isn't tied to a calendar app), they will have the raw .ics file to add to their calendar of choice.


To answer your question directly: it is not possible to predetermine a user's calendar app of choice as this information is not included in an HTTP request.

Community
  • 1
  • 1
HPierce
  • 7,249
  • 7
  • 33
  • 49
  • Thank you. So that means neither answers I linked to are good. I have to figure out how to send an ics attachment via email using PHP – Kim Stacks Nov 01 '15 at 23:07