Email Templating Class
- Depuis
- 4.0.0
◆ __construct()
__construct |
( |
|
$templateId, |
|
|
|
$language, |
|
|
Mail |
$mailer = null |
|
) |
| |
◆ addAttachment()
addAttachment |
( |
|
$name, |
|
|
|
$file |
|
) |
| |
Add an attachment to the mail
- Paramètres
-
string | $name | Filename of the attachment |
string | $file | Either a filepath or filecontent |
- Renvoie
- void
- Depuis
- 4.0.0
Références PHPMailer\$attachment, et $name.
◆ addRecipient()
addRecipient |
( |
|
$mail, |
|
|
|
$name = null , |
|
|
|
$type = 'to' |
|
) |
| |
Adds recipients for this mail
- Paramètres
-
string | $mail | Mail address of the recipient |
string | $name | Name of the recipient |
string | $type | How should the recipient receive the mail? ('to', 'cc', 'bcc') |
- Renvoie
- void
- Depuis
- 4.0.0
Références $name, et $type.
Référencé par ContactController\_sendEmail(), et Email\sendCode().
◆ addTemplateData()
◆ createTemplate()
static createTemplate |
( |
|
$key, |
|
|
|
$subject, |
|
|
|
$body, |
|
|
|
$tags, |
|
|
|
$htmlbody = '' |
|
) |
| |
|
static |
Insert a new mail template into the system
- Paramètres
-
string | $key | Mail template key |
string | $subject | A default subject (normally a translatable string) |
string | $body | A default body (normally a translatable string) |
array | $tags | Associative array of tags to replace |
string | $htmlbody | A default htmlbody (normally a translatable string) |
- Renvoie
- boolean True on success, false on failure
- Depuis
- 4.0.0
Références $db, $key, $params, $subject, $template, et Factory\getDbo().
◆ deleteTemplate()
static deleteTemplate |
( |
|
$key | ) |
|
|
static |
Method to delete a mail template
- Paramètres
-
string | $key | The key of the mail template |
- Renvoie
- boolean True on success, false on failure
- Depuis
- 4.0.0
Références $db, $key, $query, et Factory\getDbo().
◆ getAttachmentName()
getAttachmentName |
( |
string |
$file, |
|
|
string |
$name |
|
) |
| |
|
protected |
Check and if necessary fix the file name of an attachment so that the attached file has the same extension as the source file, and not a different file extension
- Paramètres
-
string | $file | Path to the file to be attached |
string | $name | The file name to be used for the attachment |
- Renvoie
- string The corrected file name for the attachment
- Depuis
- 4.0.0
Références $name, File\getExt(), et File\stripExt().
◆ getTemplate()
static getTemplate |
( |
|
$key, |
|
|
|
$language |
|
) |
| |
|
static |
◆ replaceTags()
replaceTags |
( |
|
$text, |
|
|
|
$tags |
|
) |
| |
|
protected |
Replace tags with their values recursively
- Paramètres
-
string | $text | The template to process |
array | $tags | An associative array to replace in the template |
- Renvoie
- string Rendered mail template
- Depuis
- 4.0.0
Références $i, $key, $text, et $value.
◆ setReplyTo()
setReplyTo |
( |
|
$mail, |
|
|
|
$name = '' |
|
) |
| |
Set reply to for this mail
- Paramètres
-
string | $mail | Mail address to reply to |
string | $name | Name |
- Renvoie
- void
- Depuis
- 4.0.0
Références $name.
◆ updateTemplate()
static updateTemplate |
( |
|
$key, |
|
|
|
$subject, |
|
|
|
$body, |
|
|
|
$tags, |
|
|
|
$htmlbody = '' |
|
) |
| |
|
static |
Update an existing mail template
- Paramètres
-
string | $key | Mail template key |
string | $subject | A default subject (normally a translatable string) |
string | $body | A default body (normally a translatable string) |
array | $tags | Associative array of tags to replace |
string | $htmlbody | A default htmlbody (normally a translatable string) |
- Renvoie
- boolean True on success, false on failure
- Depuis
- 4.0.0
Références $db, $key, $params, $subject, $template, et Factory\getDbo().
◆ $attachments
◆ $data
◆ $language
◆ $mailer
◆ $recipients
◆ $replyto
◆ $template_id
La documentation de cette classe a été générée à partir du fichier suivant :