|
| filterRecipients ($recipients) |
| Filter a list of recipients. More...
|
|
| message ($from=null, $to=null, $subject=null, $body=null, $html=false) |
| Create a new Swift Mailer message object. More...
|
|
| mailer ($host=null) |
| Domain specific mailer. More...
|
|
| send ($message) |
| Send a message. More...
|
|
| queue ($message, $delay=0, $id=null) |
| Add a message to the queue (with possible delay). More...
|
|
| delete ($id) |
| Delete a message from the queue. More...
|
|
| spool ($time=null) |
| Spool the message queue. More...
|
|
| box ($name=null) |
| Open an IMAP mailbox. More...
|
|
| __invoke ($from=null, $to=null, $subject=null, $body=null, $html=false) |
|
| __construct ($fred, $config=null) |
|
| __destruct () |
|
| clientConfig () |
| Public configuration. More...
|
|
| config ($key, $default=null) |
| Retrieve a config value. More...
|
|
| ping () |
| Ping function. More...
|
|
| filemtime ($filename) |
| Filemtime with session cache. More...
|
|
| component ($name) |
| Get a component (local or default). More...
|
|
| components (... $names) |
| Get multiple components in an array. More...
|
|
| propertyExists ($property) |
| Check if a property exists (public or published). More...
|
|
| constants ($prefix=null) |
| Return all constants. More...
|
|
| get ($key) |
| Get one or more properties. More...
|
|
| set ($key, $value=null) |
| Set one or more properties. More...
|
|
| __get ($key) |
|
| __set ($key, $value) |
|
|
| init () |
|
| log ($message, $result, $failures=null, $context=null) |
| Add a sent message to the log. More...
|
|
| validFilename ($filename, $ext) |
| Check if a filename is valid (external or in document root). More...
|
|
| dataTags ($body, $data, $tag=null) |
| Find all tags with a certain data tag. More...
|
|
| textBody ($body) |
| Remove all tags from the message body. More...
|
|
| htmlBody ($body, $message) |
| Process HTML body. More...
|
|
| getImap () |
|
| getMailer () |
|
| getTransport () |
|
| getQueue () |
|
| init () |
|
| done () |
|
| getSession () |
|
| publish ($property, $visibility=self::READABLE) |
| Publish a property (or hide it again). More...
|
|
| configure ($config) |
| Configure the object. More...
|
|
| _get ($key) |
| Default getter if no specific setter is defined, and the property is also not published (readable). More...
|
|
| _set ($key, $value) |
| Default setter if no specific setter is defined, and the property is also not published (writeable). More...
|
|
Definition at line 5 of file Mail.php.
◆ __invoke()
__invoke |
( |
|
$from = null , |
|
|
|
$to = null , |
|
|
|
$subject = null , |
|
|
|
$body = null , |
|
|
|
$html = false |
|
) |
| |
◆ box()
Open an IMAP mailbox.
- Parameters
-
string | $name | Mailbox to connect to (empty = default). |
- Returns
- \Rsi\Imap\Mailbox
Definition at line 277 of file Mail.php.
◆ dataTags()
dataTags |
( |
|
$body, |
|
|
|
$data, |
|
|
|
$tag = null |
|
) |
| |
|
protected |
Find all tags with a certain data tag.
- Parameters
-
string | $body | HTML message body. |
string | $data | Data tag to look for (without prefix). |
string | $tag | HTML tag. |
- Returns
- array Array with matches (full tags).
Definition at line 79 of file Mail.php.
◆ delete()
Delete a message from the queue.
- Parameters
-
- Returns
- bool True if the message was deleted.
Definition at line 236 of file Mail.php.
◆ filterRecipients()
filterRecipients |
( |
|
$recipients | ) |
|
Filter a list of recipients.
- Parameters
-
array | $recipients | A list of recipients. |
- Returns
- array Filtered list of recipients (only those matched by the restriction set, or all if no restrictions).
Definition at line 37 of file Mail.php.
◆ getImap()
◆ getMailer()
◆ getQueue()
◆ getTransport()
◆ htmlBody()
htmlBody |
( |
|
$body, |
|
|
|
$message |
|
) |
| |
|
protected |
Process HTML body.
- Parameters
-
string | $body | Message in HTML format. |
\\Swift_Message | $message | Swift Mailer message object. |
- Returns
- string Message in HTML format.
Definition at line 103 of file Mail.php.
◆ init()
◆ log()
log |
( |
|
$message, |
|
|
|
$result, |
|
|
|
$failures = null , |
|
|
|
$context = null |
|
) |
| |
|
protected |
Add a sent message to the log.
- Parameters
-
\\Swift_Message | $message | |
int | $result | Result from the send function. |
array | $failures | Addresses that failed. |
array | $context | Extra context for the log message. |
Definition at line 56 of file Mail.php.
◆ mailer()
Domain specific mailer.
- Parameters
-
string | $host | Host name of the sender. |
- Returns
- \Swift_MailTransport Specific mailer, or default mailer.
Definition at line 172 of file Mail.php.
◆ message()
message |
( |
|
$from = null , |
|
|
|
$to = null , |
|
|
|
$subject = null , |
|
|
|
$body = null , |
|
|
|
$html = false |
|
) |
| |
Create a new Swift Mailer message object.
- Parameters
-
mixed | $from | Sender address (defaultFrom or ini sendmail_from when empty). |
mixed | $to | Recipient(s). |
string | $subject | Subject line, or translation ID when the body is an array. |
string | array | $body | Message body, or translation tags. |
bool | $html | True when the message body is in HTML format. |
- Returns
- \Swift_Message
Definition at line 151 of file Mail.php.
◆ queue()
queue |
( |
|
$message, |
|
|
|
$delay = 0 , |
|
|
|
$id = null |
|
) |
| |
Add a message to the queue (with possible delay).
Note: requires the calling of spool() on a regular interval.
- Parameters
-
\\Swift_Message | $message | |
int | $delay | Delay in seconds. |
string | $id | ID for the message (if two messages have the same ID, the previous one is overwritten; empty = random). |
- Returns
- bool ID when added to the queue successfully, false on failure.
Definition at line 219 of file Mail.php.
◆ send()
Send a message.
If the message is not an object, it is created from all the parameters.
- See also
- message()
- Parameters
-
- Returns
- int Number of addresses that succeeded.
Definition at line 190 of file Mail.php.
◆ spool()
Spool the message queue.
- Parameters
-
int | $time | Maximum execution time (seconds; empty = unlimited). |
- Returns
- int Number of sent messages.
Definition at line 244 of file Mail.php.
◆ textBody()
Remove all tags from the message body.
Link addresses are placed between parenthesis after the original anchor text.
- Parameters
-
- Returns
- string Message in plain text.
Definition at line 88 of file Mail.php.
◆ validFilename()
validFilename |
( |
|
$filename, |
|
|
|
$ext |
|
) |
| |
|
protected |
Check if a filename is valid (external or in document root).
- Parameters
-
string | $filename | |
string | $ext | Allowed extension (local file only). |
- Returns
- bool True when valid.
Definition at line 67 of file Mail.php.
◆ $_imap
◆ $_logger
◆ $_mailer
◆ $_queue
◆ $_transport
◆ $attachmentExtMask
$attachmentExtMask = '(docx?|pdf|txt|xlsx?)' |
Allowed file extensions for (local) attachments.
Definition at line 18 of file Mail.php.
◆ $bodyId
Get message body from translation component (when body is array of tags); asterisk is.
Definition at line 13 of file Mail.php.
◆ $dataPrefix
Prefix for data tags (empty = do not allow).
Definition at line 16 of file Mail.php.
◆ $defaultFrom
◆ $forward
Forwarding rules (array of records with regex for from, to, cc, bcc, subject, and/or body; if all.
Definition at line 19 of file Mail.php.
◆ $imageExtMask
$imageExtMask = '(gif|jpe?g|png|svg)' |
Allowed file extensions for (local) embedable images.
Definition at line 17 of file Mail.php.
◆ $mailers
Domain specific mailer/transport (key = domain name; value = array with mailer or host, port,.
Definition at line 9 of file Mail.php.
◆ $markup
◆ $restrict
Regular expressions that the e-mail address has to match (at least one; empty = allow all).
Definition at line 8 of file Mail.php.
◆ $subjectId
Get subject from translation component (when body is array of tags); asterisk is.
Definition at line 11 of file Mail.php.
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Mail.php