PHPackages                             ohmysmtp/ohmysmtp-swiftmailer - 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. ohmysmtp/ohmysmtp-swiftmailer

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

ohmysmtp/ohmysmtp-swiftmailer
=============================

The official Swiftmailer transport for MailPace

1.0.4(4y ago)55791MITPHPPHP &gt;=7.3

Since Jun 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mailpace/ohmysmtp-swiftmailer)[ Packagist](https://packagist.org/packages/ohmysmtp/ohmysmtp-swiftmailer)[ Docs](https://github.com/mailpace/mailpace-swiftmailer)[ RSS](/packages/ohmysmtp-ohmysmtp-swiftmailer/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (7)Versions (7)Used By (0)

The official Swiftmailer transport for MailPace
===============================================

[](#the-official-swiftmailer-transport-for-mailpace)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4cefc324d3b19fbb23149753a7d61e9ef52a15b1b047261e78f0a8e683a4b34f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61696c706163652f6d61696c706163652d73776966746d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mailpace/mailpace-swiftmailer)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cdcd4ca182a25a6e9c5e9fc3d191267ab2559064c9e3215354be413bc86f07f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61696c706163652f6d61696c706163652d73776966746d61696c65722f5465737473)](https://github.com/mailpace/mailpace-swiftmailer/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/85b4e10c3e4e13ff6f36d0c1528976bf55d890eab5075817b358b7ff7013fa20/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61696c706163652f6d61696c706163652d73776966746d61696c65722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/mailpace/mailpace-swiftmailer/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0020f202f5c8ae6cbc90cecabd0a3a147d32ff0fd68757355809629f96fcd18c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61696c706163652f6d61696c706163652d73776966746d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mailpace/mailpace-swiftmailer)

[MailPace](https://mailpace.com) lets you send transactional emails from your app over an easy to use API.

This MailPace PHP Package is a transport for SwiftMailer to send emails via [MailPace](https://mailpace.com) to make sending emails from PHP apps super simple. You can use this with popular frameworks such as Laravel, Codeigniter and Symfony to send transactional emails, or with a standalone PHP app.

This package uses the MailPace HTTPS [/send endpoint](https://docs.mailpace.com/reference/send) to send the email - which is generally faster and more reliable than SMTP, although you can of course use SMTP to send out emails from your PHP app without installing this package if you prefer.

Pre-requisites
--------------

[](#pre-requisites)

You will need an MailPace account with a verified domain and organization with an active plan.

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

[](#installation)

Install the package via composer:

```
composer require mailpace/mailpace-swiftmailer
```

### Account Setup

[](#account-setup)

Set up an account at [MailPace](https://app.mailpace.com/users/sign_up) and complete the Onboarding steps

### Configure the Package

[](#configure-the-package)

First you will need to retrieve your API token for your sending domain from [MailPace](https://app.mailpace.com). You can find it under Organization -&gt; Domain -&gt; API Tokens

You'll need to store this API token somewhere in your app/runtime, we recommend Environment Variables for this, and the examples below assume that you have an environment variable called `OHMYSMTP_API_TOKEN` that contains your API token

#### Sending without a framework

[](#sending-without-a-framework)

```
