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_StaffMailer

 Methods

Set Initialization variables

__construct($staffId = false
Inherited

Parameters

$staffId

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_StaffMailer::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() 
Inherited

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 create account Mail template from the organization or the project

setCreateAccountTemplate() : boolean

Returns

booleansuccess

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

Set the reset password Mail template from the organization or the project

setResetPasswordTemplate() : boolean

Returns

booleansuccess

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

Use the Mail template code to select and set the template

setTemplateByCode(string $templateCode) 

Parameters

$templateCode

string

mail

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

Return the mailfields for a password reset template

getResetPasswordMailFields() : array

Returns

array

Get the correct Mail Template Style

getTemplateStyle() : string
Inherited

Returns

string

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

 

True if Target data is loaded

$dataLoaded : boolean

Default

 

Message body in BBcode

$bodyBb : string

Default

 

Message body in Html

$bodyHtml : string

Default

 

Message body in Plain Text

$bodyText : string

Default

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

$db

$db 

Default

 

Email From field

$from : string

Default

 

$language

$language 

Default

 

$layout

$layout 

Default

 

$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

 

Project Object

$project : 

Default

 

$request

$request : \Zend_Controller_Request_Abstract

Default

 

Staff ID

$staffId : integer

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()
 

$user

$user : \Gems_User_User

Default

 

$util

$util 

Default