QubusMailer
- Full name:
\Qubus\Mail\QubusMailer
- Parent class:
PHPMailer
- This class implements:
\Qubus\Mail\Mailer
Properties
templatePath
config
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$config | \Qubus\Config\ConfigContainer |
withFrom
Set the From and FromName properties.
Parameters:
Parameter | Type | Description |
---|---|---|
$address | string | |
$name | string | |
$auto | bool | Whether to also set the Sender address, defaults to true. |
withTo
Add a "To" address.
Parameters:
Parameter | Type | Description |
---|---|---|
$address | string|array | The email address(es) to send to. |
withCc
Add a "CC" address.
Parameters:
Parameter | Type | Description |
---|---|---|
$address | string|array | The email address(es) to send to. |
withBcc
Add a "BCC" address.
Parameters:
Parameter | Type | Description |
---|---|---|
$address | string|array | The email address(es) to send to. |
withReplyTo
Add a "Reply-To" address.
Parameters:
Parameter | Type | Description |
---|---|---|
$address | string|array | The email address(es) to reply to. |
withAddresses
Parameters:
Parameter | Type | Description |
---|---|---|
$type | string | Type of the recipient (to, cc, bcc or Reply-To) |
$addresses | mixed | Email address or array of email addresses. |
Return Value:
True on success, false if addresses not valid.
Throws:
withSender
The envelope sender of the message.
Parameters:
Parameter | Type | Description |
---|---|---|
$sender | string |
withSubject
The Subject of the message.
Parameters:
Parameter | Type | Description |
---|---|---|
$subject | string |
withHtml
Sets message type to HTML or plaintext.
Parameters:
Parameter | Type | Description |
---|---|---|
$isHtml | bool | True for HTML mode. |
withPriority
Email priority.
Parameters:
Parameter | Type | Description |
---|---|---|
$priority | ?int |
withCharset
The character set of the message.
Parameters:
Parameter | Type | Description |
---|---|---|
$charset | string | The character set of the message. |
withCustomHeader
Add a custom header.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | Custom header name. |
$value | ?string | Header value. |
withContentType
The MIME Content-type of the message.
Parameters:
Parameter | Type | Description |
---|---|---|
$contentType | string |
withAttachment
Add an attachment from a path on the filesystem.
public withAttachment(string $path, string $name = '', string $encode = self::ENCODING_BASE64, string $type = '', string $disposition = 'attachment'): static
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | Path to the attachment |
$name | string | Overrides the attachment name |
$encode | string | File encoding (see $Encoding) |
$type | string | MIME type, e.g. image/jpeg ; determined automatically from $path if not specified |
$disposition | string | Disposition to use. |
withBody
Set Mail Body configuration
Parameters:
Parameter | Type | Description |
---|---|---|
$data | string|array | Contain the values to be parsed in mail body. |
$options | array | Array of options. |
withAltBody
The plain-text message body.
Parameters:
Parameter | Type | Description |
---|---|---|
$message | string |
withXMailer
What to put in the X-Mailer header.
Parameters:
Parameter | Type | Description |
---|---|---|
$xmailer | ?string |
withSmtp
Send messages using SMTP.
withMail
Send messages using PHP's native mail() function.
withSendmail
Send messages using Sendmail.
withQmail
Send messages using qmail.
save
Save message as eml file.
Return Value:
True if saved successfully, false otherwise.
send
Create a message and send it.
Uses the sending method specified by $Mailer.
Return Value:
false on error.
Throws:
Automatically generated on 2025-10-13