Php script to send email with outlook reminder

hi,

I am looking for a php script which would send an email with the appointment/reminder to the outlook calendar of the recepient.

Thanks
Shiva-KumarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NerdsOfTechTechnology ScientistCommented:
I believe you can use iCalander and PHP to do this....

http://www.terminally-incoherent.com/blog/2008/04/14/generate-outlook-calendar-events-with-php-and-icalendar/
http://www.ietf.org/rfc/rfc2445.txt

If you want to have the ".ics" file as an "attachment" then you should create the attachment via PHP's filesystem then add it to your email generation.

=NerdsOfTech
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
This is excerpted from my church calendar.  Obviously untested code, since the data base lookups are not shown here, but hopefully the variable names make sense and you will get a good understanding of the moving parts.

I do not know if you have to URLencode() the event name or description - these are cleaned elsewhere in our scripts.

We do not send this via email - we just let the client click on a link to download the event directly from the web site into the outlook calendar.  But there is no reason I can think of that you could not send the x-vCalendar file as an attachment.

Best regards, ~Ray
<?php

// DATA BASE LOOKUP GETS EVENT INFORMATION ACCORDING TO THE $k VALUE

// GENERATE HEADER INFORMATION
$k = clean_integer($_GET["k"]);
$f = "NPCCEvent" . $k . ".vcs";

// FORMAT THE DATES LIKE THIS
$vcalstart = date("Ymd\THi00", strtotime($my_event_start));
$vcalend   = date("Ymd\THi00", strtotime($my_event_end));

// SEND THE HEADERS
header("Content-Type: text/x-vCalendar");
header("Content-Disposition: inline; filename=$f");

// SEND THE VCAL STRING WITH VARIABLE SUBSTITUTION FOR EVENT INFORMATION
?>
BEGIN:VCALENDAR
VERSION:1.0
PRODID:NPC Web Calendar
BEGIN:VEVENT
SUMMARY:<?php echo "$my_event_name" . PHP_EOL; ?>
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: <?php echo "$my_event_description" . "=0D=0A" . PHP_EOL; ?>
DTSTART:<?php echo $vcalstart . PHP_EOL; ?>
DTEND:<?php echo $vcalend . PHP_EOL; ?>
END:VEVENT
END:VCALENDAR

Open in new window

0
Shiva-KumarAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.