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.
Package email
Short Description Modular Email Library for CodeIgniter 3 with PSR-4/PSR-12 compliance
License MIT
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.