Email message.
More...
|
static | factory (array $options=[]) |
| Create an email instance form an array of options. More...
|
|
Email message.
Definition at line 13 of file Email.php.
Elgg\Email::addAttachment |
( |
|
$attachment | ) |
|
Add an attachment.
- Parameters
-
mixed | $attachment | or or or an array |
- See also
- ::factory()
- Returns
- self
Definition at line 323 of file Email.php.
Elgg\Email::addHeader |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Adds/replaces an HTTP/IMF header.
- Parameters
-
string | $name | Header name |
mixed | $value | Header value |
- Returns
- self
Definition at line 288 of file Email.php.
Elgg\Email::createEntityMessageID |
( |
\ElggEntity |
$entity, |
|
|
bool |
$add_microtime = false |
|
) |
| |
Create a Message-ID header string for the given entity.
- Parameters
-
\ElggEntity | $entity | The entity to generate the header for |
bool | $add_microtime | Add a microtime to the header (used for non create events) |
- Returns
- string
- Since
- 4.2
Definition at line 361 of file Email.php.
static Elgg\Email::factory |
( |
array |
$options = [] | ) |
|
|
static |
Create an email instance form an array of options.
- Parameters
-
array | $options | Options 'from' - ElggEntity, or email string, or 'to' - ElggEntity, or email string, or , or an array of one of these types 'cc' - ElggEntity, or email string, or , or an array of one of these types 'bcc' - ElggEntity, or email string, or , or an array of one of these types 'subject' - subject string 'body' - body string 'params' - additional parameters 'headers' - HTTP/IMF headers |
- Returns
Definition at line 80 of file Email.php.
Elgg\Email::getAttachments |
( |
| ) |
|
Get all attachments.
- Returns
- []
Definition at line 348 of file Email.php.
Returns recipient address from bcc.
- Returns
- []
Definition at line 211 of file Email.php.
Returns email body.
- Returns
- string
Definition at line 255 of file Email.php.
Returns recipient address from cc.
- Returns
- []
Definition at line 190 of file Email.php.
Returns sender address.
- Returns
Definition at line 148 of file Email.php.
Elgg\Email::getHeaders |
( |
| ) |
|
Returns headers.
- Returns
- array
Definition at line 310 of file Email.php.
Elgg\Email::getParams |
( |
| ) |
|
Returns additional params.
- Returns
- array
Definition at line 276 of file Email.php.
Elgg\Email::getSender |
( |
| ) |
|
Returns sender.
- Returns
- mixed
Definition at line 127 of file Email.php.
Elgg\Email::getSubject |
( |
| ) |
|
Returns the subject.
It is possible to limit the length of the subject string. This is sometimes needed for certain mail servers / clients.
- Returns
- string
Definition at line 234 of file Email.php.
Returns recipient address.
- Returns
- []
Definition at line 169 of file Email.php.
static Elgg\Email::prepareFrom |
( |
|
$from | ) |
|
|
staticprotected |
Converts mixed input to an instance of Laminas addres.
- Parameters
-
- Returns
- Address
- Exceptions
-
Definition at line 382 of file Email.php.
Elgg\Email::prepareRecipients |
( |
|
$recipients | ) |
|
|
protected |
Converts mixed input to an array of Laminas address instances.
- Parameters
-
mixed | $recipients | recipients input |
- Returns
- Address[]
- Exceptions
-
Definition at line 420 of file Email.php.
Elgg\Email::setBcc |
( |
|
$recipient | ) |
|
Sets recipient address in bcc.
- Parameters
-
mixed | $recipient | ElggEntity, or email string, or , or an array of one of these types |
- Returns
- self
Definition at line 201 of file Email.php.
Elgg\Email::setBody |
( |
|
$body = '' | ) |
|
Sets the email message body.
- Parameters
-
- Returns
- self
Definition at line 245 of file Email.php.
Elgg\Email::setCc |
( |
|
$recipient | ) |
|
Sets recipient address in cc.
- Parameters
-
mixed | $recipient | ElggEntity, or email string, or , or an array of one of these types |
- Returns
- self
Definition at line 180 of file Email.php.
Elgg\Email::setFrom |
( |
Address |
$from | ) |
|
Sets sender address.
- Parameters
-
\Elgg\Email\Address | $from | Sender address |
- Returns
- self
Definition at line 138 of file Email.php.
Elgg\Email::setHeaders |
( |
array |
$headers = [] | ) |
|
Replaces header bag.
- Parameters
-
- Returns
- self
Definition at line 300 of file Email.php.
Elgg\Email::setParams |
( |
array |
$params = [] | ) |
|
Sets additional params.
- Parameters
-
- Returns
- self
Definition at line 266 of file Email.php.
Elgg\Email::setSender |
( |
|
$sender | ) |
|
Sets email sender.
- Parameters
-
mixed | $sender | Original sender of the Email |
- Returns
- self
Definition at line 117 of file Email.php.
Elgg\Email::setSubject |
( |
|
$subject = '' | ) |
|
Sets email subject.
- Parameters
-
- Returns
- self
Definition at line 222 of file Email.php.
Elgg\Email::setTo |
( |
|
$recipient | ) |
|
Sets recipient address.
- Parameters
-
mixed | $recipient | ElggEntity, or email string, or , or an array of one of these types |
- Returns
- self
Definition at line 159 of file Email.php.
Elgg\Email::$attachments = [] |
|
protected |
Elgg\Email::$headers = [] |
|
protected |
The documentation for this class was generated from the following file: