Properties

$dbal

$dbal :null

The database abstraction layer buffer

Type

null

$body

$body :null|string

The email body

Type

null|string

$alternative_body

$alternative_body :null|string

The text email body

Type

null|string

Methods

__construct()

__construct(integer  $id = null,string  $language = null)

Email constructor.

Create new instance of email object

Parameters

integer $id

The Object id

string $language

The local language

Save()

Save(boolean  $force_new_id = false,boolean  $skip = false): \FAA\Obj\Result

save object entry in file system and git repository store the current payload inside the system storage and commit the changes to the local repository

Parameters

boolean $force_new_id

Indicate force new id on demand (local id empty)

boolean $skip

Skips sending email on demand

Returns

\FAA\Obj\Result —

A default system result set

FlushToDatabase()

FlushToDatabase(): \FAA\Obj\Result

Store the email in database for sending

Returns

\FAA\Obj\Result

MoveStatics()

MoveStatics(): \FAA\Obj\Result

Move statics

Move the static includes to local storage

Returns

\FAA\Obj\Result —

A system result object

CarbonCopyReceivers()

CarbonCopyReceivers(): array

Get cc receivers Parse the local storage data and return the list of registered cc receivers.

Returns

array —

List of registered receivers

GetPath()

GetPath(): string

expose the storage path provide an interface to extract the current path of this object

Returns

string —

the object storage path

RootPath()

RootPath(): string

expose root path provide an interface to the date storage path of this asset

Returns

string —

the absolute path to the storage folder

Preview()

Preview(string  $type = 'html'): \FAA\Obj\Result

Build a preview of the email and return as rendered content

Parameters

string $type

The template type to use. Defaults to html

Returns

\FAA\Obj\Result —

A system result object

Copy()

Copy(null  $target = null): \FAA\Obj\Result

Copy instance Create a clone of this email and resets the sent status

Parameters

null $target

Required for compatibility

Returns

\FAA\Obj\Result —

A system result object

Delete()

Delete(boolean  $skip = false): \FAA\Obj\Result

delete a whole asset as an asset is an extended form of the generic content the whole folder has to be deleted

Parameters

boolean $skip

Skip hooks on demand

Returns

\FAA\Obj\Result —

A system result object

Content()

Content(boolean  $parse = true): string|object

Get the request payload Get the request property and parse it on demand

Parameters

boolean $parse

Returns

string|object

Send()

Send(): \FAA\Obj\Result

Deliver email to receiver.

Calls the hook on success, otherwise it will log the mail as failed

Returns

\FAA\Obj\Result

RequestObject()

RequestObject(): mixed

Get the request as object

Returns

mixed

FormatDate()

FormatDate(  $time,string  $format = 'd.m.Y'): string

Format the date

Parameters

$time
string $format

Returns

string

RenderTemplate()

RenderTemplate(  $interface): \FAA\Obj\Result

Render the email base template and on demand the secondary one

Will also resolve static includes and dynamic attachments When attachments are encrypted the passwors will be added to the token %filepasswords%

Parameters

$interface

MailSender

Returns

\FAA\Obj\Result —

A system result object with body in values and text body in secondary values

mapImages()

mapImages(object  $mail_interface)

map includes parse object image and link tags

Parameters

object $mail_interface

Reference to the send mail interface, used to embed the images