PHPackages                             horde/imip - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. horde/imip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

horde/imip
==========

iMip inivitation protocol library

v1.0.0beta2(2w ago)00LGPL-2.1-onlyPHPPHP ^8.1

Since May 21Pushed 2w agoCompare

[ Source](https://github.com/horde/Imip)[ Packagist](https://packagist.org/packages/horde/imip)[ Docs](https://www.horde.org/libraries/Horde_Imip)[ RSS](/packages/horde-imip/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced 1w ago

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

Horde iMIP
==========

[](#horde-imip)

`horde/imip` is the iMIP (RFC 6047) transport layer for sending and parsing MIME-encapsulated iTIP messages. It bridges `horde/itip`'s decision engine to actual email delivery by listening for PSR-14 scheduling events and constructing RFC-compliant `text/calendar` MIME messages.

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

[](#installation)

```
composer require horde/imip
```

Requires PHP 8.1+.

Architecture
------------

[](#architecture)

### Design Principles

[](#design-principles)

- **Listener-based** — plugs into any PSR-14 dispatcher, no tight coupling
- **Pure PSR-4** — no legacy PSR-0 code, fully typed, readonly value objects
- **Builds on modern horde/mime** — uses `Horde\Mime\Part`, `PartBuilder`, `MessageRenderer`
- **Sends via modern horde/mail** — uses `Horde\Mail\Transport\Transport` interface
- **Bidirectional** — sends outbound iTIP and parses inbound iMIP messages

### Components

[](#components)

ClassPurpose`ImipSendingListener`PSR-14 listener: handles `*Sending` events, builds and sends MIME`MessageBuilder`Constructs `ComposedMessage` from VCalendar + sender/recipient info`ImipParsingService`Extracts `ItipMessage` from incoming MIME `Part` tree`SenderIdentity`Interface describing the sender (email, name, reply-to)`SimpleSenderIdentity`Value-object implementation of `SenderIdentity``ImipOptions`Configuration: charset, prodId, multipart preference### Outbound Flow

[](#outbound-flow)

```
horde/itip ItipProcessor
    │
    │ App applies ItipResult, then dispatches PSR-14 event
    ▼
PSR-14 EventDispatcher
    │
    ▼
ImipSendingListener
    │  - receives InvitationSending / ReplySending / CancellationSending
    │  - iterates result->actions (SendRequest, SendReply, SendCancel)
    │  - calls MessageBuilder::build() for each recipient
    │  - renders via MessageRenderer and sends via Transport
    ▼
Horde\Mail\Transport\Transport::send()

```

### Inbound Flow

[](#inbound-flow)

```
Incoming email (raw MIME)
    │
    │ Application parses with Horde\Mime\MimeParser
    ▼
Horde\Mime\Part tree
    │
    ▼
ImipParsingService::parse($part, $actorEmail)
    │  - finds text/calendar part (recursive search)
    │  - parses iCalendar via horde/icalendar
    │  - wraps as ItipMessage
    ▼
ItipMessage → feed into ItipProcessor::process()

```

### Boundaries

[](#boundaries)

This library is responsible for:

- Constructing RFC 6047 MIME messages from VCalendar objects
- Sending iMIP messages via `Horde\Mail\Transport\Transport`
- Listening for PSR-14 scheduling events dispatched after iTIP processing
- Parsing inbound MIME messages to extract `ItipMessage`

This library is **not** responsible for:

- iTIP logic (accept/reject, SEQUENCE handling, conflict detection) — see `horde/itip`
- iCalendar parsing/writing — see `horde/icalendar`
- Mail transport implementation (SMTP, sendmail, etc.) — see `horde/mail`
- MIME structure parsing beyond finding the `text/calendar` part — see `horde/mime`
- Event dispatching — the application calls `$dispatcher->dispatch()`

### Collaboration Partners

[](#collaboration-partners)

PackageRelationship`horde/itip`Provides ItipMessage, ItipResult, SendReply/Request/Cancel actions, and PSR-14 event types`horde/icalendar`Provides VCalendar, Writer for serialization, Reader/AbstractComponent for parsing`horde/mime`Provides Part, PartBuilder, MessageBuilder, MessageRenderer, MimeParser`horde/mail`Provides Transport interface, AddressList, Address, MockTransport for testing`horde/eventdispatcher`PSR-14 dispatcher that routes events to this listenerUsage
-----

[](#usage)

### Sending (Outbound iMIP)

[](#sending-outbound-imip)

```
use Horde\Imip\ImipSendingListener;
use Horde\Imip\MessageBuilder;
use Horde\Imip\SimpleSenderIdentity;
use Horde\Mail\Transport\SmtpTransport;

// Configure
$sender = new SimpleSenderIdentity(
    email: 'calendar@example.com',
    commonName: 'Calendar System',
);
$builder = new MessageBuilder();
$transport = new SmtpTransport(/* config */);

// Register listener with your PSR-14 provider
$listener = new ImipSendingListener($builder, $sender, $transport);
$provider->addListener(ItipEvent::class, $listener);

// After processing iTIP, dispatch the event — listener sends automatically
$result = $processor->process($message);
// ... apply changes ...
$dispatcher->dispatch(new ReplySending($message, $result));
```

### Parsing (Inbound iMIP)

[](#parsing-inbound-imip)

```
use Horde\Imip\ImipParsingService;
use Horde\Mime\MimeParser;

$service = new ImipParsingService();

// Parse raw email into a Part tree
$part = MimeParser::parse($rawMimeMessage);

// Extract ItipMessage (returns null if no text/calendar part)
$itipMessage = $service->parse($part, 'sender@example.com');

if ($itipMessage !== null) {
    $result = $processor->process($itipMessage);
    // ... handle result ...
}
```

### Custom Sender Identity

[](#custom-sender-identity)

Implement `SenderIdentity` for integration with your application's identity system:

```
use Horde\Imip\SenderIdentity;

class HordeIdentityAdapter implements SenderIdentity
{
    public function __construct(private MyIdentityService $identities) {}

    public function getEmail(): string { return $this->identities->getDefault()->email; }
    public function getCommonName(): string { return $this->identities->getDefault()->fullname; }
    public function getFrom(): string { return sprintf('%s ', $this->getCommonName(), $this->getEmail()); }
    public function getReplyTo(): ?string { return $this->identities->getDefault()->replyTo; }
}
```

Upgrading
---------

[](#upgrading)

This is a new package — there is no legacy `Horde_Imip` to upgrade from. The iMIP transport logic was previously embedded in `horde/itip`'s `Horde_Itip_Response*` classes (PSR-0 `lib/`). Those classes remain frozen in `horde/itip` for backward compatibility but are not used by this package.

See `horde/itip`'s [doc/UPGRADING.md](../Itip/doc/UPGRADING.md) for guidance on migrating from the legacy combined itip+imip API.

License
-------

[](#license)

LGPL-2.1 — see [LICENSE](LICENSE).

###  Health Score

33

—

LowBetter than 73% of packages

Maintenance96

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

20d ago

### Community

Maintainers

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

---

Top Contributors

[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (2 commits)")

---

Tags

responsesinvitationsimip

### Embed Badge

![Health badge](/badges/horde-imip/health.svg)

```
[![Health](https://phpackages.com/badges/horde-imip/health.svg)](https://phpackages.com/packages/horde-imip)
```

###  Alternatives

[horde/kronolith

Calendar and scheduling application

101.3k4](/packages/horde-kronolith)[horde/imp

Webmail application

261.1k](/packages/horde-imp)[horde/horde

Horde base application

582.7k62](/packages/horde-horde)[horde/imap_client

IMAP client library

274.6k15](/packages/horde-imap-client)

PHPackages © 2026

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