Download the PHP package kodhe/email without Composer

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

Kodhe Email

A refactored version of the CodeIgniter 3 Email library under the Kodhe\Framework\Email namespace. Sends email via the mail() protocol, Sendmail, or SMTP, with CC/BCC support (including batched mass BCC), attachments, MIME headers, text/html mailtype, word-wrapping, and a built-in debugger. The transport layer is modularized (MailTransport, SendmailTransport, SmtpTransport), making it easy to extend or mock during testing.

Installation

Requirements: PHP >= 8.1. No mandatory external dependencies (SMTP uses PHP's built-in sockets).

Quick Start

The fluent API returns EmailInterface, so calls can be chained as above. send() returns a bool.

Configuration

Via the constructor or initialize():

Main Methods

Method Description
from(string $from, string $name = '') Sender address
replyTo(string $replyto, string $name = '') Reply-to address
to($to) / cc($cc) Single recipient or array
bcc($bcc, int $limit = 0) BCC; $limit > 0 = mass BCC in batches
subject(string $subject) / message(string $body) Subject and body
attach(string $filename, string $disposition = '', ?string $newname = null, string $mime = '') Attachment (can be called repeatedly)
send(bool $autoClear = true): bool Send; auto-clears after delivery
clear(bool $clearAttachments = false) Resets the message state
printDebugger(array $include = ['headers', 'subject', 'body']): string Debug output without actually sending

HTML + attachment example

Suppressing real sends during development

Struktur Direktori

Migration Notes from the Old Namespace

Older documentation/tests used Kodhe\Library\Email\Email along with legacy CI3-style methods (reply_to(), set_mailtype(), the public word_wrap property). In modern Composer versions:

Configuration is done via an array (see the Configuration section), and method names use camelCase (replyTo()). The PSR-4 mapping Kodhe\Framework\Email\ → email/src/ is declared in email/composer.json.


All versions of email with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 kodhe/email contains the following files

Loading the files please wait ...