Download the PHP package contenir/contenir-mail without Composer

On this page you can find all versions of the php package contenir/contenir-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 contenir-mail

contenir/contenir-mail

Continuous Integration codecov

Compose, parse, store and send text and MIME-compliant multipart e-mail messages.

contenir/contenir-mail is a maintained continuation of the abandoned laminas/laminas-mail and laminas/laminas-mime components, which were themselves the successors of Zend Framework's Zend\Mail and Zend\Mime. The complete history of both repositories, back to 2009, is preserved here, so every contributor keeps their authorship in git log and git blame.

Requirements

ext-mbstring is not needed. The only other dependencies are the PSR clock and container interfaces and the Symfony IDN polyfill; install ext-intl for faster and stricter handling of internationalised domain names.

Install

Usage

Sending through SMTP with STARTTLS, which is the default:

Reading a mailbox:

getTextBody() and getHtmlBody() return a message's bodies as UTF-8. The HTML is returned as sent, so sanitise it before showing it.

See the documentation for transports, attachments, character sets and reading mail.

Security

Mail libraries sit on trust boundaries: application input becomes protocol commands and shell arguments, and hostile servers and messages are parsed. This package checks every input where it enters, and each protection below has a regression test.

The security documentation maps every protection to the test that proves it and to the published vulnerabilities it guards against, and lists open findings. Standards covers RFC conformance. Report vulnerabilities as described in SECURITY.md.

Coming from laminas-mail and laminas-mime

contenir-mail keeps the Zend_Mail and laminas-mail vocabulary: Message, Headers, Address, MIME parts, transports, protocols and storage keep their names and their roles. The API underneath is modernised for PHP 8.3, so it is not a drop-in replacement: values are typed and immutable, and a few classes have gone.

Then rewrite the Laminas\Mime and Laminas\Mail namespaces and update the code that touches the changed APIs. The migration guide has the steps and the full mapping tables. It starts with the changes your code will not complain about, so check these first:

Development

The QA toolchain comes from contenir/contenir-qa-tools: Mago for formatting, linting and static analysis, PHPUnit 11, and Infection for mutation testing.

CI fails if any mutant of covered code survives. Infection does not mutate code the tests never reach.

Findings inherited from laminas-mail and laminas-mime are recorded in mago-lint-baseline.toml and mago-analyze-baseline.toml. Many can only be fixed by breaking the public API. New code is held to the full standard.

Tests that need a live IMAP, POP3 or SMTP server are skipped unless enabled through the TESTS_CONTENIR_MAIL_* variables documented in phpunit.xml.dist.

License

BSD-3-Clause. See COPYRIGHT.md.


All versions of contenir-mail with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0 || ~8.4.0 || ~8.5.0
ext-iconv Version *
psr/clock Version ^1.0
symfony/polyfill-intl-idn Version ^1.27.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 contenir/contenir-mail contains the following files

Loading the files please wait ...