Download the PHP
package mailkite/mailkite without Composer
On this page you can find all versions of the php package
mailkite/mailkite. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor mailkite Package mailkite Short Description Official MailKite SDK for PHP — send and manage email over your own authenticated domain. License
MIT Homepage https://mailkite.dev/docs/libraries
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Email for every product you ship — receive email as a webhook, send over a verified domain, give an AI agent its own inbox.
The official MailKite library for PHP.
> **Read-only mirror.** This repo is a generated, release-time mirror of the MailKite monorepo (the private source of truth) — development doesn't happen here. Install from Packagist and open issues against the [MailKite docs](https://mailkite.dev/docs).
## Install
## Quickstart
## Templates from your repo
Besides `templateId` (a saved template, rendered server-side), a body can come from a local `.html`, `.htm` or `.txt` file:
The file is read by the SDK and sent as `html`/`text` — the API never sees `templateFile`. A `welcome.txt` sitting next to `welcome.html` becomes the plaintext part, and `{{merge_tags}}` in the file are still filled from `templateData` server-side. Works on `sendBatch`, `createTemplate` and `createBroadcast` too.
## Examples
Runnable examples live in [`examples/`](examples/) — send mail, verify webhooks, build an AI email agent, and log users in:
| Example | What it shows |
| --- | --- |
| [`examples/01-send-email.php`](examples/01-send-email.php) | Send an email over a verified domain — the 10-second "it works". |
| [`examples/02-receive-webhook.php`](examples/02-receive-webhook.php) | Receive inbound email as a webhook — and VERIFY the HMAC signature before trusting it. |
| [`examples/03-agent-reply.php`](examples/03-agent-reply.php) | An AI email agent: inbound email → Claude drafts a reply → MailKite sends it, threaded. |
| [`examples/04-agent-inbox.php`](examples/04-agent-inbox.php) | Give your agent its own email address — MailKite's built-in inbox agent answers mail for… |
| [`examples/05-server-login.php`](examples/05-server-login.php) | Server-side login + register. |
## API methods
Every method is documented on its own page under [`docs/`](docs/). The full surface:
| Method | What it does |
| --- | --- |
| [`send`](docs/send.md) | Send a message over a verified domain. Pass `templateId` (+ optional `templateData`) to… |
| [`sendBatch`](docs/sendBatch.md) | Send one personalized message per recipient (up to 50) in a single call. Shared fields… |
| [`sendEvent`](docs/sendEvent.md) | Record one application-level fact about a user — `user.created`, `trial.expiring`… |
| [`listEvents`](docs/listEvents.md) | List recorded events, newest first — the surface for confirming a POST landed and for… |
| [`listEventNames`](docs/listEventNames.md) | List the distinct event names this account works with, so an editor can offer them… |
| [`listSequences`](docs/listSequences.md) | List your sequences, newest first, each with live enrollment counts. Archived sequences… |
| [`createSequence`](docs/createSequence.md) | Create a sequence: a declared input shape, the steps a contact walks over time, and zero… |
| [`getSequence`](docs/getSequence.md) | Get one sequence with its definition and live enrollment counts. |
| [`updateSequence`](docs/updateSequence.md) | Edit a sequence. Changing the STEPS bumps its version and contacts already in flight keep… |
| [`deleteSequence`](docs/deleteSequence.md) | Delete a sequence and retire every contact still walking it. The response reports how… |
| [`listTriggers`](docs/listTriggers.md) | List the triggers attached to a sequence — the doors into it. |
| [`createTrigger`](docs/createTrigger.md) | Attach a trigger: when this event arrives, enroll the contact it is about. Attaching… |
| [`updateTrigger`](docs/updateTrigger.md) | Edit a trigger, or toggle `enabled` to switch the door off without deleting it. Either… |
| [`deleteTrigger`](docs/deleteTrigger.md) | Detach a trigger. Stops future enrollments through that door and nothing else. |
| [`startSequence`](docs/startSequence.md) | Start a sequence for one contact, directly — when your code already knows WHICH sequence… |
| [`stopSequence`](docs/stopSequence.md) | Stop whatever is chasing someone. Pass the `cancelKey` you set when starting — so you… |
| [`listEnrollments`](docs/listEnrollments.md) | List who is in a sequence and where each of them is. Filter with `status`. |
| [`getEnrollment`](docs/getEnrollment.md) | Get one enrollment — which sequence, which step, and what happens next. |
| [`listEnrollmentRuns`](docs/listEnrollmentRuns.md) | Every step this enrollment has executed, with the outcome and the reason for it. This is… |
| [`cancelEnrollment`](docs/cancelEnrollment.md) | Cancel one specific run by its enrollment id — the per-row action when you are looking at… |
| [`uploadAttachment`](docs/uploadAttachment.md) | Upload a file to MailKite storage and get back a secure, time-limited URL. Reference the… |
| [`listTemplates`](docs/listTemplates.md) | List your saved email templates (light metadata only — no body). Use getTemplate for the… |
| [`listBaseTemplates`](docs/listBaseTemplates.md) | List the premade base templates (light metadata). Clone one with createTemplate({ baseId… |
| [`getTemplate`](docs/getTemplate.md) | Get one template (full: subject, html, text, theme). Works for your templates (tpl_…) and… |
| [`createTemplate`](docs/createTemplate.md) | Create a template. Pass `baseId` to clone a base template into your own, or provide… |
| [`listDomains`](docs/listDomains.md) | List your domains, each with its webhook URL. |
| [`createDomain`](docs/createDomain.md) | Add a domain. Returns the domain + DNS records. Paid plans may pass `email_provider_id`… |
| [`suggestSubdomain`](docs/suggestSubdomain.md) | Suggest a free, currently-unclaimed subdomain label to prefill the input with, plus the… |
| [`checkSubdomain`](docs/checkSubdomain.md) | Check whether a free subdomain label can be claimed. Read-only and cheap — call it as the… |
| [`claimSubdomain`](docs/claimSubdomain.md) | Claim a free MailKite subdomain — a `
Requiresphp Version
>=7.4 ext-curl Version
* ext-json Version
* ext-openssl Version
* phpseclib/phpseclib Version
^3.0
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package mailkite/mailkite contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.