Download the PHP package phpdot/mail without Composer

On this page you can find all versions of the php package phpdot/mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

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.
Please rate this library. Is it a good library?

Informations about the package mail

phpdot/mail

Coroutine-safe transactional email for the PHPdot ecosystem. Compose a message with a fluent, immutable builder and send it through any transport — SMTP, sendmail, or any Symfony transport — from one injectable service. Delivery is delegated to the battle-tested symfony/mailer

Table of Contents

Requirements

Requirement Constraint
PHP >= 8.5
symfony/mailer ^8.0
symfony/mime ^8.0

phpdot/container, phpdot/config, and phpdot/package are optional suggestions — install them to auto-wire the mailer and populate MailConfig from config/mail.php; the attributes are inert at runtime, so standalone consumers need none of them.

Installation

Usage

Sending

Inject Mailer, compose fluently, and send. Each builder step returns a new Message, so chaining off the shared mailer never mutates it:

Every message needs a sender: set fromEmail in MailConfig so chains can omit ->from(), or call ->from('[email protected]', 'You') explicitly. cc(), bcc(), replyTo(), attach()/attachData(), priority(), and header() round out the builder. Header names must be RFC 5322 field names — printable ASCII without a colon — so ->header("X-Bad\r\nBcc: …", …) throws InvalidHeaderNameException where it is set instead of injecting lines onto the wire.

Composing without sending

$mail->message() starts a bare Message you can build and pass around; its getters (recipients(), htmlBody(), attachments(), …) expose the composed state, and a configured base message is a safe reusable template because every step clones:

Outcomes

send() returns a Receipt (the message id plus the transport's debug transcript — the SMTP session log when the wire talks SMTP) when the transport accepts the message, and throws TransportException when it is rejected — every Symfony failure is translated into the package's own MailException hierarchy, so no Symfony type leaks into your code. The exceptions are shaped for trace logs: messages are single-line with offending values escaped, and context getters (getScheme() on TransportException, getHeaderName() on InvalidHeaderNameException) expose the facts a log line wants — never the DSN, which holds credentials. Accepted is not the same as delivered: a Receipt means the transport took responsibility, not that the mailbox received it.

Architecture

Mailer is the injected #[Singleton] façade; its builder methods start a fresh immutable Message. send() hands the message to Transport, which maps it onto a symfony/mime Email via EmailFactory, builds a one-shot transport from the MailConfig DSN, delivers, and returns a Receipt. Symfony lives only inside Transport/; Mailbox and Attachment are the immutable value objects.

Testing

License

MIT — see LICENSE.

This repository is a read-only mirror. The canonical source lives in phpdot/monorepo; pull requests and issues are handled there: pulls · issues.


All versions of mail with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
symfony/mailer Version ^8.0
symfony/mime Version ^8.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 phpdot/mail contains the following files

Loading the files please wait ...