PHP ICalendar Email Code

Working diligently day and night  (oh, the commitment) to tackle PHP iCal emails, I finally got some code working. I was amazed at how few examples I could find, the majority of which would not work. The single biggest problem with getting this working was making those Accept, Deny, Tentative buttons appear in Outlook.

My Largest issue with coding this was the following message….

As the meeting organizer, you do not need to respond to the meeting

Lies! This was caused by the actual headers and encoding of the email rather than the content of my iCal information. Anyway, after 2 days (and evenings) of trying to get this working I finally broke through at 3pm today!

The Code

The following code has been genericised to an extent, if you have any problems getting it working please let me know. It does not generate a reponse when buttons are pressed as it was designed for use from a noreply email address; in order to get a response you would need to update the iCal code. You may prefer to download this with the example rather than copying and pasting, the iCal code is very sensitive to extra characters, tabs, etc.

//Written Using PHP4, it will probably work fine in PHP5. I tested using Outlook 2003/ 2007, Exchange Server 2003, Googlemail, Hotmail and Google Calendar.
//$firstname is the first name of target
//$lastname is the last name of target
//$email is the targets email address
//$meeting_date is straight from a DATETIME mysql field and assumes UTC.
//$meeting_name is the name of your meeting
//$meeting_duration is the duration of your meeting in seconds (3600 = 1 hour)

function sendIcalEmail ($firstname, $lastname, $email, $meeting_date, $meeting_name, $meeting_duration)  {

	$from_name = “My Name”;
	$from_address = “myname@mydomain.com”;
	$subject = “Meeting Booking”; //Doubles as email subject and meeting subject in calendar
	$meeting_description = “Here is a brief description of my meeting\n\n”;
	$meeting_location = “My Office”; //Where will your meeting take place

	//Convert MYSQL datetime and construct iCal start, end and issue dates
	$meetingstamp = strtotime($meeting_date . ” UTC”);
	$dtstart= gmdate(”Ymd\THis\Z”,$meetingstamp);
	$dtend= gmdate(”Ymd\THis\Z”,$meetingstamp+$meeting_duration);
	$todaystamp = gmdate(”Ymd\THis\Z”);

	//Create unique identifier
	$cal_uid = date(’Ymd’).’T’.date(’His’).”-”.rand().”@mydomain.com”;

	//Create Mime Boundry
	$mime_boundary = “—-Meeting Booking—-”.md5(time());

	//Create Email Headers
	$headers = “From: “.$from_name.” <”.$from_address.”>\n”;
	$headers .= “Reply-To: “.$from_name.” <”.$from_address.”>\n”;

	$headers .= “MIME-Version: 1.0\n”;
	$headers .= “Content-Type: multipart/alternative; boundary=\”$mime_boundary\”\n”;
	$headers .= “Content-class: urn:content-classes:calendarmessage\n”;

	//Create Email Body (HTML)
	$message .= “–$mime_boundary\n”;
	$message .= “Content-Type: text/html; charset=UTF-8\n”;
	$message .= “Content-Transfer-Encoding: 8bit\n\n”;

	$message .= “<html>\n”;
	$message .= “<body>\n”;
	$message .= ‘<p>Dear ‘.$firstname.’ ‘.$lastname.’,</p>’;
	$message .= ‘<p>Here is my HTML Email / Used for Meeting Description</p>’;
	$message .= “</body>\n”;
	$message .= “</html>\n”;
	$message .= “–$mime_boundary\n”;

	//Create ICAL Content (Google rfc 2445 for details and examples of usage, beware of adding tabs)
	$ical =    ‘BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
ORGANIZER:MAILTO:’.$from_address.’
DTSTART:’.$dtstart.’
DTEND:’.$dtend.’
LOCATION:’.$meeting_location.’
TRANSP:OPAQUE
SEQUENCE:0
UID:’.$cal_uid.’
DTSTAMP:’.$todaystamp.’
DESCRIPTION:’.$meeting_description.’
SUMMARY:’.$subject.’
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR’;

	$message .= 'Content-Type: text/calendar;name="meeting.ics";method=REQUEST;charset=utf-8\n';
	$message .= 'Content-Transfer-Encoding: 8bit\n\n';
	$message .= $ical;

	//SEND MAIL
	$mail_sent = @mail( $email, $subject, $message, $headers );

	if($mail_sent)     {
		return true;
	} else {
		return false;
	}

}

Download Full Source and Example

Finally


Hopefully I will have saved you some time and this will be enough to get you kickstarted and developing some lovely ICAL PHP code. If you found this useful then please consider using paypal to buy me a beer by clicking the icon on the right! Thanks :)

74 replies
  1. Lisa
    Lisa says:

    Hello,
    I found your code, it is really great that I was looking for.

    I have success it, but I still have problem.

    I don’t know how to update email after they accept that event.

    I am using this code from web page using sql data base.

    If you could, help me please, please cherry on top.

    Thank you.

    Lisa

    Reply
  2. theneos
    theneos says:

    Hi, i tried to use this..but running your sample code does not work on google/hotmail/outlook.

    i tried to make the METHOD to REQUEST and it worked on hotmail and google already..but on outlook it does not recognize the attachment..

    so i tried to change the header from multipart/alternative to multipart/mixed and outlook now can see the attachment which i can open add to my calendar but is there a way where i can see right away the Accept, Deny Tentative buttons?

    thanks

    Reply
    • Kausha
      Kausha says:

      Hi theneos,

      I tried to work on the code for google using this code. But i am not able to achieve it. As you mention that by making METHOD to REQUEST worked for you on hotmail and google so can you please help me out with this. And also i don’t want to send it as attachment but directly as invitation mail with accept,deny, maybe buttons. Below is my code that i carried out:

      $mime_boundary = “—-Meeting Booking—-“.md5(time());

      //Create Email Headers
      $headers = “From: “.$from_name.” \n”;
      $headers .= “Reply-To: “.$from_name.” \n”;

      $headers .= “MIME-Version: 1.0\n”;
      $headers .= “Content-Type: multipart/alternative; boundary=\”$mime_boundary\r\n”;
      $headers .= “Content-class: urn:content-classes:calendarmessage\n”;

      //Create Email Body (HTML)
      $message .= “–$mime_boundary\n”;
      $message .= “Content-Type: text/html; charset=UTF-8\n”;
      $message .= “Content-Transfer-Encoding: 8bit\n\n”;

      $message .= “\n”;
      $message .= “\n”;
      $message .= ‘Dear ‘.$firstname.’ ‘.$lastname.’,’;
      $message .= ‘Here is my HTML Email / Used for Meeting Description’;
      $message .= “\n”;
      $message .= “\n”;
      $message .= “–$mime_boundary\n”;

      $message .= ‘Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST;charset=utf-8\n’;
      $message .= ‘Content-Transfer-Encoding: 8bit\n\n’;
      $message .= “BEGIN:VCALENDAR\r\n”;
      $message .= “PRODID://Microsoft Corporation//Outlook 11.0 MIMEDIR//EN\r\n”;
      $message .= “VERSION:2.0\r\n”;
      $message .= “METHOD:REQUEST\r\n”;
      $message .= “BEGIN:VEVENT\r\n”;
      $message .= “STATUS:CONFIRMED\r\n”;
      $message .= “DTSTART:”.$dtstart.”\r\n”;
      $message .= “DTEND:”.$dtend.”\r\n”;
      $message .= “ORGANIZER;RSVP=TRUE;mailto:”.$from_address.”\r\n”;
      $message .= “UID:”.$cal_uid.”\r\n”;
      $message .= “LOCATION:room1\r\n”;
      $message .= “TRANSP:OPAQUE\r\n”;
      $message .= “SEQUENCE:”.$sequence.”\r\n”;
      $message .= “DESCRIPTION:”.$meeting_description.”\r\n”;
      $message .= “SUMMARY:”.$subject.”\r\n”;
      $message .= “ACTION:DISPLAY\r\n”;
      $message .= “END:VEVENT\r\n”;
      $message .= “END:VCALENDAR\r\n”;

      //SEND MAIL
      $mail_sent = @mail( $email, $subject, $message, $headers );

      Reply
  3. theneos
    theneos says:

    changed again to multipart/alternative and the problem with outlook not showing the buttons is that need to add charset on this line

    $message .= ‘Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST;charset=utf-8\n’;

    thanks!

    Reply
  4. Safford
    Safford says:

    This code, with theneos’ charset modification, worked well. I’m getting Accept/Decline/Tentative buttons in Outlook.

    What should I change in the code to have these buttons send a response back to me? Right now, when I click “Accept”, the meeting appears on my calendar, but no response is sent.

    Reply
  5. Jaimin
    Jaimin says:

    I get this kind of reply in my mail…

    ——Meeting Booking—-f780f4ef534b83675175480963020b86 text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

    Dear Jaimin Panchal,

    Here is my HTML Email / Used for Meeting Description
    ——Meeting Booking—-f780f4ef534b83675175480963020b86 text/calendar;name=”meeting.ics”;method=REQUEST\nContent-Transfer-Encoding: 8bit BEGIN:VCALENDAR\r\n PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN\r\n VERSION:2.0\r\n METHOD:PUBLISH\r\n BEGIN:VEVENT\r\n ORGANIZER:MAILTO:abc@example.com\r\n DTSTART:20100706T134000Z\r\n DTEND:20100706T144000Z\r\n LOCATION:My Office\r\n TRANSP:OPAQUE\r\n SEQUENCE:0\r\n UID:20101215T111338-1451318093@example.com\r\n DTSTAMP:20101215T054338Z\r\n DESCRIPTION:Here is a brief description of my meeting \r\n SUMMARY:Meeting Booking\r\n PRIORITY:5\r\n CLASS:PUBLIC\r\n END:VEVENT\r\n END:VCALENDAR\r\n

    Reply
    • Julian Young
      Julian Young says:

      Hi Jaimin, without getting kneedeep in your code it’s hard to see what’s going wrong. At a glance it looks like your multipart seperation isn’t working. I would recommend you simplify as much as possible to discover the problem.

      Reply
    • ashu
      ashu says:

      Hi, my name is ashu. i am facing a problem. i am sending a sharing calendar as an attachment. Attachment is sending successfully but i opened this attachment then in outlook there is no “accept/decline” option is showing. Plz help me. am sending you the whole code:-

      $firstname=’ashu’;
      $lastname=’chauhan’;
      $email=’ashu.vikas007@gmail.com’;
      $meeting_date=’2012-07-10 18:30:00′;
      $meeting_name=’Net4 Events’;
      $meeting_duration=’1800′;
      date_default_timezone_set(‘Asia/Calcutta’);
      $initial_data=”BEGIN:VCALENDAR
      PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
      VERSION:2.0
      METHOD:REQUEST”.”\r\n”;

      $end_data=”\nEND:VCALENDAR”;

      $data=$initial_data.’BEGIN:VEVENT
      UID:20101215T111338-1451318093@example.com
      SEQUENCE:0
      PRIORITY:5
      CLASS:PUBLIC
      DTSTAMP:20120711T063646Z
      CREATED:20120711T063646Z
      LAST-MODIFIED:20120711T063646Z
      STATUS:CANCELLED
      DTSTART:20120711T093000Z
      SUMMARY:test event
      DESCRIPTION:test event
      COMMENT:
      DTEND:20120711T103000Z
      LOCATION:Noida
      TRANSP:OPAQUE
      ORGANIZER:MAILTO:ashu.s@net4.com
      X-SQ-EVTLASTUPDATOR:ashu.s@net4.com
      X-SQ-EVTOWNERS:ashu.s@net4.com
      X-SQ-EVTREADABLEUSERS:
      X-SQ-EVTWRITEABLEUSERS:
      X-SQ-EVTPARENTCALENDARS:sm_cal_20120710T135427Z
      END:VEVENT’.$end_data;

      sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data);
      FUNCTION sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data) {

      $from_name = “My Name”;
      $from_address = “ashu.s@net4.com”;
      $subject = “Meeting Booking”; //Doubles as email subject and meeting subject in calendar
      $meeting_description = “Here is a brief description of my meeting\n\n”;
      $meeting_location = “My Office”; //Where will your meeting take place

      //Convert MYSQL datetime and construct iCal start, end and issue dates
      /*$meetingstamp = STRTOTIME($meeting_date . ” UTC”);
      $dtstart= GMDATE(“Ymd\THis\Z”,$meetingstamp);
      $dtend= GMDATE(“Ymd\THis\Z”,$meetingstamp+$meeting_duration);
      */
      $todaystamp = GMDATE(“Ymd\THis\Z”);
      $message=”;
      //Create unique identifier
      $cal_uid = DATE(‘Ymd’).’T’.DATE(‘His’).”-“.RAND().”@mydomain.com”;

      //Create Mime Boundry
      $mime_boundary = “—-Meeting Booking—-“.MD5(TIME());

      //Create Email Headers
      $headers = “From: “.$from_name.” \n”;
      $headers .= “Reply-To: “.$from_name.” \n”;

      $headers .= “MIME-Version: 1.0\n”;
      $headers .= “Content-Type: text/calendar; boundary=\”$mime_boundary\”\n”;
      $headers .= “Content-class: urn:content-classes:calendarmessage\n”;

      //Create Email Body (HTML)
      /*$message .= “–$mime_boundary\n”;
      $message .= “Content-Type: multipart/alternative; charset=UTF-8\n”;
      $message .= “Content-Transfer-Encoding: 8bit\n\n”;
      */
      $message .= “\n”;
      $message .= “\n”;
      $message .= ‘Dear ‘.$firstname.’ ‘.$lastname.’,’;
      $message .= ‘Here is my HTML Email / Used for Meeting Description’;
      $message .= “\n”;
      $message .= “\n”;
      $message .= “–$mime_boundary\n”;

      //Create ICAL Content (Google rfc 2445 for details and examples of usage)
      $ical =$data;
      $message .= ‘Content-Type: text/calendar;charset=UTF-8’;
      $message .= “Content-Transfer-Encoding: 8bit\n\n”;
      $message .= $ical;

      //SEND MAIL
      $mail_sent = @mail( $email, $subject, $message, $headers );

      if($mail_sent) {
      echo “Mail sent”;
      } ELSE {
      echo “Mail Failure”;
      }

      }

      ?>

      Reply
  6. Manoj
    Manoj says:

    I am getting same code as jaimin,
    but in my case, I am using the php.mailer.php class to send the mail
    thanks in advance….
    i kept the downloaded code as it is and used the above class instead the mail function of php

    Reply
    • Julian Young
      Julian Young says:

      Hi Manoj, I’m not sure how Jamain got round his issue. I’d recommend downloading the source and not copying and pasting to start you off. Other than that make sure there are no tabs or extra spaces in the $ical string.

      Reply
  7. Manoj
    Manoj says:

    can you please help to figure out whats wrong in this code…..

    ——Meeting Booking—-22a76ff52a17573fe533afbe226e2f7c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
    Dear Manoj Deshmukh,

    Here is my HTML Email / Used for Meeting Description

    ——Meeting Booking—-22a76ff52a17573fe533afbe226e2f7c Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST\nContent-Transfer-Encoding: 8bit BEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT ORGANIZER:MAILTO:manoj.deshmukh@extentia.com DTSTART:20110112T184000Z DTEND:20110112T194000Z LOCATION:My Office TRANSP:OPAQUE SEQUENCE:0 UID:20110113T051628-5941@mydomain.com DTSTAMP:20110113T051628Z DESCRIPTION:Here is a brief description of my meeting SUMMARY:Meeting Booking PRIORITY:5 CLASS:PUBLIC END:VEVENT END:VCALENDAR

    Reply
  8. Manoj
    Manoj says:

    Hi Julian,
    thanks for your comment…
    its working by using php mail function directly instead of php.mailer class.
    but now request not getting in my calender, no buttons (accept, reject, tentative)
    appearing in the mail.

    Reply
  9. Stephanie
    Stephanie says:

    Hi Julian,

    Another confused would-be user here. I’ve downloaded your .zip file and have tried only changing the email address so it sends the test to me. However, the email that appears in my inbox only has the message content and nothing to do with the calendar appears (no attatchment, no buttons, just a simple Dear John letter. Very frustrating as I know this works for other people, and am not sure why it is not working for me! Thanks for your help in advance!

    Reply
  10. Stephanie
    Stephanie says:

    To add – when opening the email on my iPod Touch the calendar attatchment shows and can be added to my calendar, also on Outlook 2007 it seems to work fine – just a problem with Outlook 2003?

    Reply
  11. Joseph Sliker
    Joseph Sliker says:

    I suspect I will be buying you a beer shortly as soon as I see how well I can get this to work with the in-house calendar I’ve been monkeying with for the past several years. The basics of it seemed to work for me right out of the box! God bless you for putting this together.

    Reply
    • Julian Young
      Julian Young says:

      Thanks for the beers Jospeh, I finally had an opportunity to drink them the other night. It means a lot. Cheers!

      Reply
  12. Ali
    Ali says:

    Really appreciate your efforts Julian! thank you.

    I also wanted to know if there is a way that I can make the ‘proposed new time’ feature work in Outlook 07. I tried doing it but wasn’t really working how its supposed to.

    Thanks in Advance,
    Ali

    Reply
  13. JAI
    JAI says:

    Hi
    I have downloded ur code and tried to send mail ,I cant able to see ACCEPT/REJECT BUTTON in gmail and I cant able to view the calender in outlook. Please help me out.

    Reply
  14. Holodyn
    Holodyn says:

    Julian – wonderful code.

    Had to make some changes for the event to import on Outlook 2007

    iCal Data Changed from:
    METHOD:PUBLISH

    to:
    METHOD:REQUEST

    iCal Data Added:
    UID:’.date(‘Ymd’).’T’.date(‘His’).’-‘.rand().’-example.com

    The UID should be coded to relate to an event record so future changes can be synchronized

    Reply
  15. Chris
    Chris says:

    Hi got this all working but any ideas on how to construct a cancel event email.

    got this so far but not working

    $ical = ‘BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    BEGIN:VEVENT
    METHOD:CANCEL
    STATUS:CANCELLED
    ORGANIZER:MAILTO:bookings@company.com
    DTSTART:’.$dtstart.’
    DTEND:’.$dtend.’
    LOCATION:’.$RESdetails[room].’
    TRANSP:OPAQUE
    SEQUENCE:1
    UID:’.$cal_uid.’
    DTSTAMP:’.$todaystamp.’
    DESCRIPTION:IT Room Bookings
    SUMMARY:Room Booking
    PRIORITY:5
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR’;

    $message .= ‘Content-Type: text/calendar;name=”meeting.ics”;method=CANCEL;charset=utf-8\n’;
    $message .= “Content-Transfer-Encoding: 8bit\n\n”;
    $message .= $ical;

    Reply
  16. rajan
    rajan says:

    Hi Julian ,
    Recently i have implemented your code.In outlook it is working fine .
    In gmail, i am not able to get the meeting content.

    How can we compose “Yes”, “No”,”May be” content in gmail . so that user can respond from gmail to update their status.

    I tried with old uid number(already created appointemnt google calendar).This scenario i can receive the message with “Yes”, “No”,”May be”.

    Could you guide me how can i implement new appointment request in gmail calendar? (generating uid for new calendar)

    Reply
  17. hammand
    hammand says:

    I want to achieve the same but using SMTP. Invitation should come as an actual calendar invitation with the text in the body of the email not as an attachment in an email.

    Reply
  18. Steph
    Steph says:

    Hi,

    didn´t have any ideas to get the iCal can be responsed for cancelation or acception.

    My problem is that if i cancel the invitation, the sender isn´t informed by the invited person.

    Are there any solutions?

    Testing on a Outlook Web Access

    Thx for replys,
    Steph

    Reply
  19. Rowan
    Rowan says:

    Hi, your script doesn’t work for me(opened email in outlook 2007), used your source codes and example exactly.

    This function below however does…only I cant get it to have an html body in the email for more info.
    As soon as I start trying to add multipart headers, it stops coming through as a meeting and takes away the accept, tentative, decline buttons.

    Any idea what I can do or why yours is not working?

    function sendCal($dtstart,$dtend,$loc,$summary,$from,$to,$subject) {
    $vcal = “BEGIN:VCALENDAR\r\n”;
    $vcal .= “VERSION:2.0\r\n”;
    $vcal .= “PRODID:-//CompanyName//ProductName//EN\r\n”;
    $vcal .= “METHOD:REQUEST\r\n”;
    $vcal .= “BEGIN:VEVENT\r\n”;
    $vcal .= “ATTENDEE;CN=\”Attendee1Name\”;ROLE=REQ-PARTICIPANT;RSVP=FALSE:MAILTO:Att1Mail@mail.com\r\n”;
    $vcal .= “ATTENDEE;CN=\”Attendee2Name\”;ROLE=REQ-PARTICIPANT;RSVP=FALSE:MAILTO:Att2Mail@mail.com\r\n”;
    $vcal .= “UID:”.date(‘Ymd’).’T’.date(‘His’).”-“.rand().”-domain.com\r\n”;
    $vcal .= “DTSTAMP:”.date(‘Ymd’).’T’.date(‘His’).”\r\n”;
    $vcal .= “DTSTART:$dtstart\r\n”;
    $vcal .= “DTEND:$dtend\r\n”;
    if ($loc != “”) $vcal .= “LOCATION:$loc\r\n”;
    $vcal .= “SUMMARY:$summary\r\n”;
    $vcal .= “BEGIN:VALARM\r\n”;
    $vcal .= “TRIGGER:-PT15M\r\n”;
    $vcal .= “ACTION:DISPLAY\r\n”;
    $vcal .= “DESCRIPTION:Reminder\r\n”;
    $vcal .= “END:VALARM\r\n”;
    $vcal .= “END:VEVENT\r\n”;
    $vcal .= “END:VCALENDAR\r\n”;

    $headers = “From: $from\r\nReply-To: $from”;
    $headers .= “\r\nMIME-version: 1.0\r\nContent-Type: text/calendar; method=REQUEST; charset=\”iso-8859-1\””;
    $headers .= “\r\nContent-Transfer-Encoding: 7bit\r\nX-Mailer: Microsoft Office Outlook 12.0”;

    mail($to, $subject, $vcal, $headers);
    }

    Reply
  20. Edwin
    Edwin says:

    Hi,

    It’s almost working for me……
    In outlook the meetingtime is the $dtstart time + 1 hour and the end is $dtend + 1 hour. Has probably something to do with daylight saving but I can’t figure it out.
    Any idea how to fix this??

    Reply
    • Julian Young
      Julian Young says:

      Hi Edwin,

      Sorry but without getting involved with the development of your code I can’t help much. This code is quite old now and since it doesn’t generate any revenue for me it’s hard for me to find the time to justify keeping it up to date. My recommendation is to pop your code up on StackOverflow and get yourself some crowsourced assistance ;) Please do let everyone hear know how you fixed the problem when you get it sorted.

      Reply
  21. Edwin
    Edwin says:

    One of my colleagues found the sollutions for me.
    It was a relative simple one.
    In the following code:

    $meetingstamp = strtotime($meeting_date . ” UTC”);

    We needed the remove the . ” UTC” part and then we get the right time in Outlook.

    Reply
  22. Kelly-Anne Glenn
    Kelly-Anne Glenn says:

    Hi,

    Do you know if the iCal requests work in Outlook 2010. I have copied and pasted your source code and changed nothing but the email address. All I seem to get is an email Dear John Smith… No meeting request.. Can you shed some light on this?

    Reply
  23. Ruchira
    Ruchira says:

    please can you guys give a option when using smtp mechanism for send mail, how can add ical with request method

    Reply
  24. deep
    deep says:

    this is not working to create a event in thunderbird … please help //i am using php mailer function .. thx in advance

    Reply
  25. ashu
    ashu says:

    Hi, my name is ashu. i am facing a problem. i am sending a sharing calendar as an attachment. Attachment is sending successfully but when i opened this attachment then in outlook there is no “accept/decline” option is showing. Plz help me. am sending you the whole code:-

    $firstname=’ashu’;
    $lastname=’chauhan’;
    $email=’ashu.vikas007@gmail.com’;
    $meeting_date=’2012-07-10 18:30:00′;
    $meeting_name=’Net4 Events’;
    $meeting_duration=’1800′;
    date_default_timezone_set(‘Asia/Calcutta’);
    $initial_data=”BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:REQUEST”.”\r\n”;

    $end_data=”\nEND:VCALENDAR”;

    $data=$initial_data.’BEGIN:VEVENT
    UID:20101215T111338-1451318093@example.com
    SEQUENCE:0
    PRIORITY:5
    CLASS:PUBLIC
    DTSTAMP:20120711T063646Z
    CREATED:20120711T063646Z
    LAST-MODIFIED:20120711T063646Z
    STATUS:CANCELLED
    DTSTART:20120711T093000Z
    SUMMARY:test event
    DESCRIPTION:test event
    COMMENT:
    DTEND:20120711T103000Z
    LOCATION:Noida
    TRANSP:OPAQUE
    ORGANIZER:MAILTO:ashu.s@net4.com
    X-SQ-EVTLASTUPDATOR:ashu.s@net4.com
    X-SQ-EVTOWNERS:ashu.s@net4.com
    X-SQ-EVTREADABLEUSERS:
    X-SQ-EVTWRITEABLEUSERS:
    X-SQ-EVTPARENTCALENDARS:sm_cal_20120710T135427Z
    END:VEVENT’.$end_data;

    sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data);
    FUNCTION sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data) {

    $from_name = “My Name”;
    $from_address = “ashu.s@net4.com”;
    $subject = “Meeting Booking”; //Doubles as email subject and meeting subject in calendar
    $meeting_description = “Here is a brief description of my meeting\n\n”;
    $meeting_location = “My Office”; //Where will your meeting take place

    //Convert MYSQL datetime and construct iCal start, end and issue dates
    /*$meetingstamp = STRTOTIME($meeting_date . ” UTC”);
    $dtstart= GMDATE(“Ymd\THis\Z”,$meetingstamp);
    $dtend= GMDATE(“Ymd\THis\Z”,$meetingstamp+$meeting_duration);
    */
    $todaystamp = GMDATE(“Ymd\THis\Z”);
    $message=”;
    //Create unique identifier
    $cal_uid = DATE(‘Ymd’).’T’.DATE(‘His’).”-”.RAND().”@mydomain.com”;

    //Create Mime Boundry
    $mime_boundary = “—-Meeting Booking—-”.MD5(TIME());

    //Create Email Headers
    $headers = “From: “.$from_name.” \n”;
    $headers .= “Reply-To: “.$from_name.” \n”;

    $headers .= “MIME-Version: 1.0\n”;
    $headers .= “Content-Type: text/calendar; boundary=\”$mime_boundary\”\n”;
    $headers .= “Content-class: urn:content-classes:calendarmessage\n”;

    //Create Email Body (HTML)
    /*$message .= “–$mime_boundary\n”;
    $message .= “Content-Type: multipart/alternative; charset=UTF-8\n”;
    $message .= “Content-Transfer-Encoding: 8bit\n\n”;
    */
    $message .= “\n”;
    $message .= “\n”;
    $message .= ‘Dear ‘.$firstname.’ ‘.$lastname.’,’;
    $message .= ‘Here is my HTML Email / Used for Meeting Description’;
    $message .= “\n”;
    $message .= “\n”;
    $message .= “–$mime_boundary\n”;

    //Create ICAL Content (Google rfc 2445 for details and examples of usage)
    $ical =$data;
    $message .= ‘Content-Type: text/calendar;charset=UTF-8′;
    $message .= “Content-Transfer-Encoding: 8bit\n\n”;
    $message .= $ical;

    //SEND MAIL
    $mail_sent = @mail( $email, $subject, $message, $headers );

    if($mail_sent) {
    echo “Mail sent”;
    } ELSE {
    echo “Mail Failure”;
    }

    }

    ?>

    Reply
  26. ashu
    ashu says:

    Hi, my name is ashu. i am facing a problem. i am sending a sharing calendar as an attachment. Attachment is sending successfully but i opened this attachment then in outlook there is no “accept/decline” option is showing. Plz help me. am sending you the whole code:-

    $firstname=’ashu’;
    $lastname=’chauhan’;
    $email=’ashu.vikas007@gmail.com’;
    $meeting_date=’2012-07-10 18:30:00′;
    $meeting_name=’Net4 Events’;
    $meeting_duration=’1800′;
    date_default_timezone_set(‘Asia/Calcutta’);
    $initial_data=”BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:REQUEST”.”\r\n”;

    $end_data=”\nEND:VCALENDAR”;

    $data=$initial_data.’BEGIN:VEVENT
    UID:20101215T111338-1451318093@example.com
    SEQUENCE:0
    PRIORITY:5
    CLASS:PUBLIC
    DTSTAMP:20120711T063646Z
    CREATED:20120711T063646Z
    LAST-MODIFIED:20120711T063646Z
    STATUS:CANCELLED
    DTSTART:20120711T093000Z
    SUMMARY:test event
    DESCRIPTION:test event
    COMMENT:
    DTEND:20120711T103000Z
    LOCATION:Noida
    TRANSP:OPAQUE
    ORGANIZER:MAILTO:ashu.s@net4.com
    X-SQ-EVTLASTUPDATOR:ashu.s@net4.com
    X-SQ-EVTOWNERS:ashu.s@net4.com
    X-SQ-EVTREADABLEUSERS:
    X-SQ-EVTWRITEABLEUSERS:
    X-SQ-EVTPARENTCALENDARS:sm_cal_20120710T135427Z
    END:VEVENT’.$end_data;

    sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data);
    FUNCTION sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration,$data) {

    $from_name = “My Name”;
    $from_address = “ashu.s@net4.com”;
    $subject = “Meeting Booking”; //Doubles as email subject and meeting subject in calendar
    $meeting_description = “Here is a brief description of my meeting\n\n”;
    $meeting_location = “My Office”; //Where will your meeting take place

    //Convert MYSQL datetime and construct iCal start, end and issue dates
    /*$meetingstamp = STRTOTIME($meeting_date . ” UTC”);
    $dtstart= GMDATE(“Ymd\THis\Z”,$meetingstamp);
    $dtend= GMDATE(“Ymd\THis\Z”,$meetingstamp+$meeting_duration);
    */
    $todaystamp = GMDATE(“Ymd\THis\Z”);
    $message=”;
    //Create unique identifier
    $cal_uid = DATE(‘Ymd’).’T’.DATE(‘His’).”-”.RAND().”@mydomain.com”;

    //Create Mime Boundry
    $mime_boundary = “—-Meeting Booking—-”.MD5(TIME());

    //Create Email Headers
    $headers = “From: “.$from_name.” \n”;
    $headers .= “Reply-To: “.$from_name.” \n”;

    $headers .= “MIME-Version: 1.0\n”;
    $headers .= “Content-Type: text/calendar; boundary=\”$mime_boundary\”\n”;
    $headers .= “Content-class: urn:content-classes:calendarmessage\n”;

    //Create Email Body (HTML)
    /*$message .= “–$mime_boundary\n”;
    $message .= “Content-Type: multipart/alternative; charset=UTF-8\n”;
    $message .= “Content-Transfer-Encoding: 8bit\n\n”;
    */
    $message .= “\n”;
    $message .= “\n”;
    $message .= ‘Dear ‘.$firstname.’ ‘.$lastname.’,’;
    $message .= ‘Here is my HTML Email / Used for Meeting Description’;
    $message .= “\n”;
    $message .= “\n”;
    $message .= “–$mime_boundary\n”;

    //Create ICAL Content (Google rfc 2445 for details and examples of usage)
    $ical =$data;
    $message .= ‘Content-Type: text/calendar;charset=UTF-8′;
    $message .= “Content-Transfer-Encoding: 8bit\n\n”;
    $message .= $ical;

    //SEND MAIL
    $mail_sent = @mail( $email, $subject, $message, $headers );

    if($mail_sent) {
    echo “Mail sent”;
    } ELSE {
    echo “Mail Failure”;
    }

    }

    ?>

    Reply
  27. martin
    martin says:

    hi all, im martin and im having next problem

    in

    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;
    CN=Name of Example:MAILTO:theemailfortheattendee@domain.com

    so, when i recive the email(attendee) it doesn show as an mandatory his assistance.. does anybody knows if im doing something wrong?

    thanks in advance…..

    ps. i tried many differents ways like
    ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT:MAILTO:
    jsmith@host.com and anyone is working for me

    (i recommend to all check this page)
    http://www.ietf.org/rfc/rfc2445.txt

    Reply
  28. Edwin
    Edwin says:

    Hello,

    We recently upgraded to Exchange 2010 and now the code isn’t working anymore.
    I still receive an email, but not a meeting request like it did with Exchange 2007. If the requestor or the attendees open the received email, then the requestor and also the attendees can send it as a meeting request. A bit strange.

    Does anyone know what should be changed to get it working with Exchange 2010?

    Regards,
    Edwin

    Reply
    • Edwin
      Edwin says:

      Just after asking here, we found the solution.

      We needed to change “METHOD:PUBLISH” in “METHOD:REQUEST” and it worked with Exchange 2010.

      Reply
  29. David G
    David G says:

    Your code and this website are great! Thanks!
    I am having trouble creating a .ics file to cancel an appt.
    The files are being sent to GroupWise 7.0.4

    I can create an appt. When I click on this attached file in GroupWise, the calendar function is launched and my appt is placed into GroupWise.

    BEGIN:VCALENDAR
    PRODID:-//Novell Inc//Groupwise 7.0.2
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    ORGANIZER:MAILTO:gotlid@stjoe.on.ca
    DTSTART:20121212T130000
    DTEND:20121212T140000
    LOCATION:
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:1349312763572
    DTSTAMP:20121204T210848Z
    DESCRIPTION:New CCC Internal bookingPatient: ab
    SUMMARY:CCC INT: ab
    PRIORITY:5
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR

    but when I generate another .ics file to cancel the preceding appointment, and click on it in GroupWise mail,nothing happens:

    BEGIN:VCALENDAR
    PRODID:-//Novell Inc//Groupwise 7.0.2
    VERSION:2.0
    METHOD:CANCEL
    BEGIN:VEVENT
    ORGANIZER:MAILTO:gotlid@stjoe.on.ca
    DTSTART:20121212T130000
    DTEND:20121212T140000
    LOCATION:
    TRANSP:OPAQUE
    SEQUENCE:72
    UID:1349312763572
    DTSTAMP:20121204T210903Z
    DESCRIPTION:New CCC Internal bookingPatient: ab
    SUMMARY:CCC INT: ab
    PRIORITY:5
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR

    Can anyone help?

    Thanks

    Reply
  30. sy
    sy says:

    im stuck all im getting from my email is

    kahit ano!——Meeting Booking—-11c9f038b50f7af1ff062567d866068c Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST;charset=utf-8\nContent-Transfer-Encoding: 8bit BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20121122T023000Z DTEND:20121122T093000Z DTSTAMP:20121122T055016Z ORGANIZER;CN=sbuenavista@openovate.com:mailto:sbuenavista@openovate.com UID:9ha9uc08b94hs2v5ehm9b5pbik@google.com ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE ;CN=sbuenavista@openovate.com;X-NUM-GUESTS=0:mailto:sbuenavista@openovate.c om ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=sy buenavista;X-NUM-GUESTS=0:mailto:sybuena@gmail.com CREATED:20121122T055016Z DESCRIPTION:anything\nView your event at http://www.google.com/calendar/eve nt?action=VIEW&eid=OWhhOXVjMDhiOTRoczJ2NWVobTliNXBiaWsgc3lidWVuYUBt&tok=MjU jc2J1ZW5hdmlzdGFAb3Blbm92YXRlLmNvbTNkZTNmNGQ5ODE1ZjExZTg0ZjExZDFkNDVjMmMzYT VmZDM2NzNlM2U&ctz=Asia/Manila&hl=en. LAST-MODIFIED:20121122T055016Z LOCATION:manila SEQUENCE:0 STATUS:CONFIRMED SUMMARY:test TRANSP:OPAQUE END:VEVENT END:VCALENDAR ——Meeting Booking—-11c9f038b50f7af1ff062567d866068c–

    Reply
  31. gireesh
    gireesh says:

    I am getting the below response in my message, i am not getting any mail getting error some where. I am not able to fix this. Please help me
    –—-Meeting Booking—-19b475b675993765a7f0fd444c7e428b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

    Dear John Smith,

    Here is my HTML Email / Used for Meeting Description
    –—-Meeting Booking—-19b475b675993765a7f0fd444c7e428b Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST;charset=utf-8\nContent-Transfer-Encoding: 8bit\n\nBEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT ORGANIZER:MAILTO:gireeshd@vsplash.net DTSTART:20130830T174000Z DTEND:20130830T184000Z LOCATION:My Office TRANSP:OPAQUE SEQUENCE:0 UID:20130830T110153-31879@vsplash.net DTSTAMP:20130830T110153Z DESCRIPTION:Here is a brief description of my meeting SUMMARY:Meeting Booking PRIORITY:5 CLASS:PUBLIC END:VEVENT END:VCALENDARA

    Reply
  32. Dharma
    Dharma says:

    hi,

    i am using sendIcalEmail () to send invitation emails but am getting following error to my email

    Kerio Outlook Connector hasn’t been able to deliver the message

    We are sorry, but an error occurred while synchronizing the Inbox/00002878 message from the server to your Outlook account. This is usually caused by an error in the message, but there may be a bug in the product too.
    The original message can be found in the Failed Message.eml attachment and you may succeed in opening it. You can also use Kerio WebMail to access the message.
    ________________________________________
    Details for administrator:
    Error: 0x8004011b MAPI_E_CORRUPT_DATA
    Message: [SID=dharma.reddy@techendeavour.com/2d0bcab4-f600-4296-8440-3629e4121fa0/00002878,
    ID={6630B5F0-E1A8-40A0-15EB-48EC90175BF7},
    Folder: Inbox ]

    The message has also been copied to the __keriomapi__STORE/Failed_Conversions folder in the user’s store.
    Please send the content of this error report (including both attachments) to Kerio Technologies.

    Reply
  33. Dhwani
    Dhwani says:

    Hi. In Ical , if I need to send meeting in outlook and gmail both then what I need to add?

    METHOD: REQUEST works for outlook.
    METHOD: PUBLISH works for gmail.

    But I want to use common code for both.

    Reply
  34. Tony - XWS
    Tony - XWS says:

    Hey guys,

    I’ve been struggling with an iCal code email handlers I created for a while. Tried a few suggestions on here to no avail. It always worked in gmail but never in outlook.

    Turns out, outlook now seems to require a method include in the email headers.

    So:

    ContentType: text/calendar;

    Wasn’t working. But, this:

    ContentType: text/calendar; method=REQUEST;

    Does.. Funnily enough. Yet another nightmare with microsoft. Wouldn’t it be nice if MS did a nice reference guide to their email ics regulations.

    Thanks
    Tony

    Reply
  35. Hilton
    Hilton says:

    You post very interesting articles here. Your blog
    deserves much bigger audience. It can go viral if you give it initial boost, i know very useful tool that can help you,
    just type in google: svetsern traffic tips

    Reply
  36. MG
    MG says:

    Hi, I am trying to send email to outlook with calender event using your code but in outlook mail box I am getting email like this and also I am not getting attachment file fopr the same

    Code
    public function createUserNotification($data){

    $from_name = “My Name”;
    $from_address = “myname@mydomain.com”;
    $subject = “Meeting Booking”; //Doubles as email subject and meeting subject in calendar
    $meeting_description = “Here is a brief description of my meeting\n\n”;
    $meeting_location = “My Office”; //Where will your meeting take place

    //Convert MYSQL datetime and construct iCal start, end and issue dates
    $meetingstamp = strtotime($meeting_date . ” UTC”);
    $dtstart= gmdate(“Ymd\THis\Z”,$meetingstamp);
    $dtend= gmdate(“Ymd\THis\Z”,$meetingstamp+$meeting_duration);
    $todaystamp = gmdate(“Ymd\THis\Z”);

    //Create unique identifier
    $cal_uid = date(‘Ymd’).’T’.date(‘His’).”-“.rand().”@mydomain.com”;

    //Create Mime Boundry
    $mime_boundary = “Meeting Booking–“.md5(time());

    //Create Email Body (HTML)
    $message .= $mime_boundary.”\n”;
    $message .= “\n”;
    $message .= “\n”;
    $message .= “Dear “.$firstname.” “.$lastname.”,”;
    $message .= “Here is my HTML Email / Used for Meeting Description”;
    $message .= “\n”;
    $message .= “\n”;
    $message .= $mime_boundary.”\n”;

    //Create ICAL Content (Google rfc 2445 for details and examples of usage, beware of adding tabs)
    $ical = “BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    ORGANIZER:MAILTO:”.$from_address.”
    DTSTART:”.$dtstart.”
    DTEND:”.$dtend.”
    LOCATION:”.$meeting_location.”
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:”.$cal_uid.”
    DTSTAMP:”.$todaystamp.”
    DESCRIPTION:”.$meeting_description.”
    SUMMARY:”.$subject.”
    PRIORITY:5
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR”;
    $message .= $ical;

    $sent = ”;
    $mail = array(
    ‘from’ => ‘info@careervita.com’,
    ‘fromName’ => ‘manisha.g@careervita.com’,
    ‘to’ => ‘g_manisha@outlook.com’,
    ‘subject’ => $subject,
    ‘body’ => $message,
    );

    $sent = YumMailer::send($mail);
    }

    YiiMailer code

    class YumMailer {
    static public function send($to, $subject = null, $body = null, $header = null) {
    if($to instanceof YumUser)
    $to = $to->profile->email;

    if(!is_array($to))
    $to = array(
    ‘to’ => $to,
    ‘subject’ => $subject,
    ‘body’ => $body);

    if(Yum::module()->mailer == ‘swift’)
    {
    $sm = Yii::app()->swiftMailer;
    $mailer = $sm->mailer($sm->mailTransport());
    $message = $sm->newMessage($to[‘subject’])
    ->setFrom($to[‘from’])
    ->setTo($to[‘to’])
    ->setBody($to[‘body’]);

    return $mailer->send($message);
    }
    else if(Yum::module()->mailer == ‘PHPMailer’)
    {
    Yii::import(‘application.extensions.phpmailer.JPhpMailer’);
    $mailer = new JPhpMailer(true);
    if (Yum::module()->phpmailer[‘transport’])
    switch (Yum::module()->phpmailer[‘transport’]) {
    case ‘smtp’:
    $mailer->IsSMTP();
    break;
    case ‘sendmail’:
    $mailer->IsSendmail();
    break;
    case ‘qmail’:
    $mailer->IsQmail();
    break;
    case ‘mail’:
    default:
    $mailer->IsMail();
    }
    else
    $mailer->IsMail();

    /*
    if (Yum::module()->phpmailer[‘html’])
    $mailer->IsHTML(Yum::module()->phpmailer[‘html’]);
    else
    $mailer->IsHTML(false);
    */
    $mailer->IsHTML(true);

    $mailerconf=Yum::module()->phpmailer[‘properties’];
    if(is_array($mailerconf))
    foreach($mailerconf as $key=>$value) {
    if(isset(JPhpMailer::${$key}))
    JPhpMailer::${$key} = $value;
    else
    $mailer->$key=$value;
    }
    //$mailer->SetFrom($to[‘from’], Yum::module()->phpmailer[‘msgOptions’][‘fromName’]); //FIXME
    $mailer->SetFrom($to[‘from’], $to[‘fromName’]); //FIXME
    $mailer->AddAddress($to[‘to’], Yum::module()->phpmailer[‘msgOptions’][‘toName’]); //FIXME
    $mailer->Subject = $to[‘subject’];
    $mailer->Body = $to[‘body’];
    if(array_key_exists(‘cc’, $to))
    $mailer->AddCC($to[‘cc’]);
    return $mailer->Send();
    }
    else
    {
    if($header == null)
    {
    //Create Mime Boundry
    $mime_boundary = “—-Meeting Booking—-“.md5(time());

    //Create Email Headers
    $header .= “MIME-Version: 1.0\n”;
    $header .= “Content-Type: multipart/alternative; boundary=\”$mime_boundary\”\n”;
    $header .= “Content-Type: text/html; charset=UTF-8\n”;
    $header .= ‘Content-Type: text/calendar;name=”meeting.ics”;method=REQUEST;charset=utf-8\n’;
    $header .= ‘Content-Transfer-Encoding: 8bit\n\n’;
    $header .= “Content-class: urn:content-classes:calendarmessage\n”;

    //$header = ‘MIME-Version: 1.0’ . “\n”;
    //$header .= ‘Content-type: text/html; charset=utf-8’ . “\n”;

    $header .= ‘To: ‘ . $to[‘to’] . “\n”;
    if(Yum::hasModule(‘message’))
    $header .= ‘From: ‘ . Yum::module(‘message’)->adminEmail . “\r\n”;
    else
    $header .= ‘From: ‘ . Yum::module()->adminEmail . “\r\n”;
    }
    return mail($to[‘to’], $to[‘subject’], $to[‘body’], $header);
    }
    }

    Output
    Meeting Booking–6aa429e85191cc91d1849730c0ae8950

    Dear ,

    Here is my HTML Email / Used for Meeting Description
    Meeting Booking–6aa429e85191cc91d1849730c0ae8950 BEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT ORGANIZER:MAILTO:myname@mydomain.com DTSTART:20150701T174949Z DTEND:20150701T174949Z LOCATION:My Office TRANSP:OPAQUE SEQUENCE:0 UID:20150701T174949-284149700@mydomain.com DTSTAMP:20150701T121949Z DESCRIPTION:Here is a brief description of my meeting SUMMARY:Meeting Booking PRIORITY:5 CLASS:PUBLIC END:VEVENT END:VCALENDAR

    Reply
  37. migliori portabici
    migliori portabici says:

    This is really interesting, You are a very professional
    blogger. I have joined your rss feed and look ahead to searching for
    extra of your fantastic post. Additionally, I have shared your web site in my social networks

    Reply
  38. natural skin care
    natural skin care says:

    I was honored to receive a call from a friend as soon as he uncovered the important suggestions
    shared in your site. Looking at your blog
    article is a real wonderful experience. Thank you for taking
    into account readers much like me, and I would like for you the best of success for a professional in this field.

    Reply
  39. Novella
    Novella says:

    I really don’t thoughts download patches; nevertheless, the builders ought to inform you what dimension those data
    graphics, animations and particular results in Bleach Brave Souls are perfect absolutely, considering that this online
    game is free-to-play especially.

    Reply
  40. Sean
    Sean says:

    To update an iCal, you must have the same UID, and you must increment the SEQUENCE value as well. You may also be required to increment the LAST-MODIFIED field as well, but can’t vouch for that. In my initial tests, a unix timestamp works as the sequence, as I was generating ical events on the fly, so every time I created a new event, the sequence was larger by virtue of the timestamp. I have not tested to ensure this is accepted by all (or most) clients, but I did test with the Lightening plugin for Mozilla Thunderbird.

    Hope that helps.

    Reply

Trackbacks & Pingbacks

  1. […] viaPHP ICalendar Email Code | Julian Young Marketing. […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *