Jump to content

ICS Generator


thausmann
 Share

Recommended Posts

The module can generate basic ICS calendar strings and files.

Usage Example:

$icsgen = wire()->modules->IcsGenerator;

// set properties
$icsgen->setArray(array(
  'date' => new \DateTime('2033-12-24 12:00'),
  'dateEnd' => new \DateTime('2033-12-24 13:00'),
  'summary' => 'Event title',
  'description' => 'Event description',
));

// get path to a temporary .ics file
// (using wire()->files->tempDir)
$icspath = $icsgen->getFile();

// send email with ics file
$mail = wireMail();
$mail->attachment($icspath, 'calendar.ics');
$mail->to($user->email);
$mail->subject('ICS Demo');
$mail->body('This is a ICS demo.');
$numSent = $mail->send();

For more infos see GitHub Readme or Modules Page. If you experience reproducable issues please open a GitHub issue.

  • Like 13
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...