Skip to content

Installation ​

Install Mail with Composer.

shell
composer require raxos/mail

Requirements ​

  • PHP 8.5 or newer.

The package has no required PHP extensions of its own.

Provider clients ​

Mail bundles the official client library for each provider, so you do not need to require them separately:

  • mailgun/mailgun-php backs the Mailgun provider.
  • wildbit/postmark-php backs the Postmark provider.
  • phpmailer/phpmailer backs the SMTP provider.

Raxos dependencies ​

Mail builds on a few other Raxos packages, which Composer installs for you:

  • raxos/foundation: provides the isTesting() helper the providers use to short circuit sending during tests.
  • raxos/contract: defines the public interfaces, MailerInterface, MailerExceptionInterface and EmailAddressExceptionInterface.
  • raxos/error: provides the base Exception class that every Mail exception extends.

Return to the Mail introduction.