package Gems
subpackage Mail
copyright Copyright (c) 2013 Erasmus MC
license New BSD License
since Class available since version 1.6.2
inherited_from \Gems_Mail_MailerAbstract

 Methods

__construct()

__construct($patientId = false, $organizationId = false

Parameters

$patientId

$organizationId

Add Flash Message

addMessage(string $message) 
Inherited

Parameters

$message

string

Add a To field

addTo($newTo, $newToName = ''
Inherited

Parameters

$newTo

$newToName

After registry load, load the MailFields

afterRegistry() 
inherited_from \Gems_Mail_MailerAbstract::afterRegistry()

After registry load, load the MailFields

afterRegistry() 
Inherited

Replace the mailkeys with the mailfields in given text

applyFields(string $text) : string
Inherited

Parameters

$text

string

The text to apply the replacment to

Returns

stringThe text with replaced mailfields

Returns true if the "email.bounce" setting exists in the project configuration and is true

bounceCheck() : boolean
Inherited

Returns

boolean

getDataLoaded()

getDataLoaded() 

Get the prefered template language

getLanguage() : string
Inherited

Returns

stringlanguage code

Return the mailFields

getMailFields(boolean $marked = true) : Array
Inherited

Parameters

$marked

boolean

Return the mailfields with their markers

Returns

ArrayList of the mailfields and their values

Get Flash message

getMessages() : Array
Inherited

Returns

Array

Get the organization in relation to the current mailtarget

getOrganization() : \Gems_User_Organization
Inherited

Returns

\Gems_User_Organization

Get specific data set in the mailer

getPresetTargetData() : Array
Inherited

Returns

Array

get a specific template.

getTemplate(integer $templateId, $language = null
Inherited

If the selected translation exists, get that translation Else if the selected translation isn't the default, select the default translation Else select the first not empty translation Else return false

Parameters

$templateId

integer

Template ID

$language

Add specified markers to the mailfield keys

markMailFields($mailFields) : Array
Inherited

Parameters

$mailFields

Returns

ArrayThe marked mailfields

Send the mail

send() 
Inherited

setBody()

setBody($message, $renderer = 'Bbcode'
Inherited

Parameters

$message

$renderer

set the from field

setFrom($newFrom) 
Inherited

Parameters

$newFrom

Set the languange in which the mail should be sent.

setLanguage(string $language) 
Inherited

Parameters

$language

string

language code

Set the current Organization as from

setOrganizationFrom() 
Inherited

Organization or project Style (as defined in application/configs/email/)

setStyle($style) 
Inherited

Parameters

$style

set the subject of the mail

setSubject($newSubject) 
Inherited

Parameters

$newSubject

set a specific template as subject/body

setTemplate(integer $templateId) 
Inherited

Parameters

$templateId

integer

Template ID

set the base selected template. The actual message could be changed

setTemplateId(integer $templateId) 
Inherited

Parameters

$templateId

integer

Template ID

Set the time when the email should be sent.

setTime() 
Inherited

set the To field, overwriting earlier settings completely

setTo($newTo, $newToName = ''
Inherited

Parameters

$newTo

$newToName

Add Mailfields to the existing mailfields

addMailFields(array $mailfields) 
Inherited

Parameters

$mailfields

array

After the mail has been processed by the mailer

afterMail() 
Inherited

Before the mail is processed by the mailer

beforeMail() 
Inherited

Get the respondent mailfields

getRespondentMailfields() : array

Returns

array

Get the correct Mail Template Style

getTemplateStyle() : string
Inherited

Returns

string

Get the respondent mailfields and add them

loadMailFields() 
inherited_from \Gems_Mail_MailerAbstract::loadMailFields()

Initialize the mailfields

loadMailFields() 
Inherited

Load the organization from the given organization id

loadOrganization() 
Inherited

Function to get the current organization id.

loadOrganizationId() 
Inherited

 Properties

 

Message body in BBcode

$bodyBb : string

Default

 

Message body in Html

$bodyHtml : string

Default

 

Message body in Plain Text

$bodyText : string

Default

 

$db

$db 

Default

 

Email From field

$from : string

Default

 

$language

$language 

Default

 

$layout

$layout 

Default

 

$loader

$loader : \Gems_Loader

Default

inherited_from \Gems_Mail_MailerAbstract::loader
 

$loader

$loader : \Gems_Loader

Default

 

The start and end markers for the mailfields

$mailFieldMarkers : array

Default

array('start' => '{', 'end' => '}')
 

Collection of the different available mailfields

$mailFields : array

Default

 

The mailfields with marked keys

$markedMailFields : array

Default

 

Flash messages

$messages : array

Default

 

$organization

$organization : \Gems_User_Organization

Default

 

Organization ID

$organizationId : integer

Default

inherited_from \Gems_Mail_MailerAbstract::organizationId
 

Organization ID

$organizationId : integer

Default

 

Patient ID

$patientId : integer

Default

 

Project Object

$project : 

Default

 

$respondent

$respondent : \Gems_Tracker_Respondent

Default

 

Subject of the Message

$subject : string

Default

 

filename of the html template

$templateStyle : string

Default

 

$time

$time 

Default

 

Collection of all the recipients of the mail

$to : array

Default

array()
 

$util

$util 

Default