Skip to content

Sending .ics invites via Amazon SES

Notifications You must be signed in to change notification settings

lampdev/ical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

iCal library


###This is a PHP library to send out [.ics](http://en.wikipedia.org/wiki/ICalendar) calendar invites through Amazon SES API (aws.amazon.com). ###Official [AWS PHP SDK](https://aws.amazon.com/sdkforphp/) is required [Amazon SES API](http://aws.amazon.com/ses/), see composer.js.
The library supports timezones in [PHP Timezone](https://php.net/manual/en/timezones.php) format.
Event time should specify in [UNIX Timestamp](http://www.unixtimestamp.com/) format.

###How to use:

  • Create an object of iCal class and pass the required options to its constructor. The required options are: SES API key and secret and a verified SES From: email.
  • You can set the region of AWS by calling ::setRegion() method (not a required step)
  • Setup .ics configuration, it should be an array - see iCal.lib.example.php.
//config for .ics$icsConfig = array( 'toEmail' => '[email protected]', 'organizerName' => 'Example organization name', 'productName' => 'Example organization product', 'language' => 'EN', 'organizerEmail' => '[email protected]', 'startTime' => (new \DateTime('2014-11-21 12:00:00'))->getTimestamp(), 'endTime' => (new \DateTime('2014-11-21 14:00:00'))->getTimestamp(), 'description' => 'Event description', 'location' => 'Event location', 'timezone' => 'Europe/Amsterdam', //example timezone from https://php.net/manual/en/timezones.php'subjectEmail' => 'Email subject', 'subjectEvent' => 'Event subject', 'organizerName' => 'John Doe', 'organizerEmail' => '[email protected]' );

The required options here are: toEmail, event start time, organizer name and location.

  • Call object function send() with the array from p.3 as the only parameter.
  • ::send() returns true or false dependnig on the result.

About

Sending .ics invites via Amazon SES

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages