PHPackages                             cosimomeli/swiftmailer-calendar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. cosimomeli/swiftmailer-calendar

AbandonedArchivedLibrary[Mail &amp; Notifications](/categories/mail)

cosimomeli/swiftmailer-calendar
===============================

Swiftmailer attachment class to send embedded iCal

1.0.2(9y ago)712.9k4[1 issues](https://github.com/cosimomeli/swiftmailer-calendar/issues)[1 PRs](https://github.com/cosimomeli/swiftmailer-calendar/pulls)MITPHPPHP &gt;=5.3.3

Since Sep 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cosimomeli/swiftmailer-calendar)[ Packagist](https://packagist.org/packages/cosimomeli/swiftmailer-calendar)[ Docs](https://github.com/cosimomeli/swiftmailer-calendar)[ RSS](/packages/cosimomeli-swiftmailer-calendar/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

swiftmailer-calendar
====================

[](#swiftmailer-calendar)

A simple class to embed calendar events to emails.

Installation
------------

[](#installation)

You can install this package by using [Composer](http://getcomposer.org), running this command:

```
composer require cosimomeli/swiftmailer-calendar
```

Link to Packagist:

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

#### 1. Create an iCal object

[](#1-create-an-ical-object)

You can make it by string concatenation or you can use one of the many libraries to build it. I suggest markuspoerschke/iCal:

The result will be something like this:

```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:TestCalendar
METHOD:REQUEST
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:57d2e0b599f89
DTSTART:20170320T110000Z
SEQUENCE:0
TRANSP:OPAQUE
DTEND:20170320T150000Z
LOCATION:900 Jay St.\, Brooklyn
SUMMARY:Summary of the event
ATTENDEE;PARTSTAT=ACCEPTED;RSVP=FALSE:mailto:example@domain.com
CLASS:PUBLIC
DESCRIPTION:Description of the event
ORGANIZER:mailto:organizer@example.com
DTSTAMP:20160909T161757Z
END:VEVENT
END:VCALENDAR

```

More information about iCalendar specifications here:

Just be sure to set the METHOD field as PUBLISH or REQUEST, and set at least the recipient of the email as ATTENDEE.

#### 2. Create the Swift\_Calendar object

[](#2-create-the-swift_calendar-object)

```
$attachment = new Swift_Calendar($iCalString, Swift_Calendar::METHOD_REQUEST);
```

The method must be the same as the one you set in the iCal.

#### 3. Attach it to the message

[](#3-attach-it-to-the-message)

```
$swiftMessage->attach($attachment);
```

You can add more different MIME parts to the message. I tested it with text/plan + text/html and with a normal attachment too.

#### 4. Send it

[](#4-send-it)

```
$mailer->send($swiftMessage);
```

\##Notes

Mail clients handle the embedded calendar in different ways. Here are some of my personal experiences:

- **Outlook**: Uses the email body as event description and the email subject as event title. Calendars with PUBLISH method are not listed with emails, but only showed as toast in the web interface (so my advice is to NOT use this method).
- **Gmail**: Uses the fields DESCRIPTION and SUMMARY as description and title of the event (just as it should be)

Feel free to ask any question and to give any suggestion for improvements.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3577d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c441e251db056e1c2d96fd76489489442373c3ef6c0cbbe817ec8f2b68331cbf?d=identicon)[cosimomeli](/maintainers/cosimomeli)

---

Top Contributors

[![cosimomeli](https://avatars.githubusercontent.com/u/11272734?v=4)](https://github.com/cosimomeli "cosimomeli (5 commits)")

---

Tags

vCalendarcalendarswiftmailer

### Embed Badge

![Health badge](/badges/cosimomeli-swiftmailer-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/cosimomeli-swiftmailer-calendar/health.svg)](https://phpackages.com/packages/cosimomeli-swiftmailer-calendar)
```

###  Alternatives

[cspoo/swiftmailer-mailgun-bundle

Swiftmailer Mailgun bundle

1041.1M](/packages/cspoo-swiftmailer-mailgun-bundle)[mailjet/mailjet-swiftmailer

A SwiftMailer transport implementation for Mailjet

251.3M9](/packages/mailjet-mailjet-swiftmailer)[aimeos/ai-swiftmailer

SwiftMailer adapter for Aimeos web shops and e-commerce solutions

19168.5k5](/packages/aimeos-ai-swiftmailer)[yuan1994/tp-mailer

A powerful and beautiful php mailer for All of ThinkPHP and Other PHP Frameworks based SwiftMailer

812.0k1](/packages/yuan1994-tp-mailer)[goetas/to-swift-mime-parser

Parse a generic mail stream, and convert it to a SwiftMailer Message

1244.7k2](/packages/goetas-to-swift-mime-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
