Local
Local
Local mail transport implementation using PHP's mail() function.
class Local extends \Hazaar\Mail\TransportExtends: Hazaar\Mail\Transport
Sends email messages via the local system's sendmail utility, formatting headers and handling DSN options. Throws exceptions on failure.
Methods
init
Initializes the local mail transport, verifying the presence of the sendmail utility.
public init(array $options): boolReturns: bool
Checks if sendmail is available on the system. Throws an exception if not found. Delegates further initialization to the parent transport.
Parameters
| Parameter | Type | Description |
|---|---|---|
$options | array | configuration options for the transport |
send
Sends an email message using the local system's sendmail utility via PHP's mail() function.
public send(TransportMessage $message): mixedReturns: mixed
To and Subject go to mail() as arguments; From, Cc, Reply-To, the extra headers and the MIME headers go in the headers. Bcc recipients are added as a Bcc header, which sendmail -t (PHP's default sendmail_path) uses as recipients and removes before delivery. The sender address is passed to sendmail with -f, so bounces and delivery status notifications go to it.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | Hazaar\Mail\TransportMessage | the message to send via local transport |
Generated by Hazaar API Doc Generator on Sun, 08 Nov 2026 03:36:15 +0000