Download the PHP package hydrakit/mail without Composer
On this page you can find all versions of the php package hydrakit/mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hydrakit/mail
More information about hydrakit/mail
Files in hydrakit/mail
Package mail
Short Description Outgoing mail behind one transport contract: SMTP for delivery, log and array transports so tests and local development never send.
License MIT
Homepage https://hydra.williamhleucka.com
Informations about the package mail
Hydra Mail
Part of the Hydra PHP framework. Documentation: hydra.williamhleucka.com/docs.
Read-only mirror.
hydrakit/mailis developed in hydra-foundation/hydra underpackages/mail, and republished here on every push. A commit pushed to this repository is overwritten by the next one; issues are disabled for that reason, and a pull request opened here cannot be merged. Both belong upstream.
Outgoing mail behind one transport contract. SmtpTransport delivers; LogTransport
writes each message to the log with its links intact; ArrayTransport keeps them
in memory. Only the first sends anything, so tests and local development never do.
A message with no sender gets MAIL_FROM_ADDRESS. Every recipient must be
accepted before the message is sent, so a refused address fails the whole send
rather than delivering to some recipients. TLS is never skipped: with
MAIL_ENCRYPTION=tls a server that does not offer STARTTLS is an error, and
credentials are refused outright with MAIL_ENCRYPTION=none.
| Setting | Default | |
|---|---|---|
MAIL_TRANSPORT |
smtp |
smtp, log or array |
MAIL_HOST |
required for smtp |
|
MAIL_PORT |
587 |
|
MAIL_ENCRYPTION |
tls |
tls (STARTTLS), ssl (implicit TLS) or none |
MAIL_USERNAME, MAIL_PASSWORD |
AUTH PLAIN, or LOGIN when PLAIN is not offered | |
MAIL_FROM_ADDRESS, MAIL_FROM_NAME |
the default sender | |
MAIL_TIMEOUT |
10 |
seconds, for the connection and each reply |
MAIL_EHLO_DOMAIN |
localhost |
the name this client greets the server with |
When the app binds a PSR-14 EventDispatcherInterface, every message a
transport accepts is announced as Events\MessageSent, carrying the message as
sent (sender filled in) and the transport's name. A send that throws announces
nothing. The package stores nothing; an app that wants a log of sent mail
listens:
A listener that throws reaches the caller of send() after the mail went out,
so one that records should catch and log its own failures. FakeMailer
dispatches nothing.
In tests, register Testing\FakeMailServiceProvider after MailServiceProvider
and assert on the FakeMailer it binds:
Not yet: attachments, custom headers, and SMTPUTF8 (addresses are ASCII; names and subjects may be anything).
All versions of mail with dependencies
hydrakit/core Version ^0.31
psr/log Version ^3.0
psr/clock Version ^1.0
psr/event-dispatcher Version ^1.0