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
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
string
The text with replaced mailfields
Returns true if the "email.bounce" setting exists in the project
configuration and is true
bounceCheck() : boolean
Inherited
getDataLoaded()
getDataLoaded()
Inherited
Get the prefered template language
getLanguage() : string
Inherited
Returns
string
language code
Return the mailFields
getMailFields(boolean $marked = true
) : Array
Inherited
Parameters
$marked
boolean
Return the mailfields with their markers
Returns
Array
List of the mailfields and their values
Get Flash message
getMessages() : Array
Inherited
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
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
Array
The 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
set the from field
setFrom($newFrom)
Inherited
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
Organization or project Style (as defined in application/configs/email/)
setStyle($style)
Inherited
set the subject of the mail
setSubject($newSubject)
Inherited
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)
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
Get the correct Mail Template Style
getTemplateStyle() : string
Inherited
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
Message body in BBcode
$bodyBb : string
Message body in Html
$bodyHtml : string
Message body in Plain Text
$bodyText : string
$db
$db : \Zend_Db_Adapter_Abstract
Email From field
$from : string
$loader
$loader : \Gems_Loader
The start and end markers for the mailfields
$mailFieldMarkers : array
Default
array('start' => '{', 'end' => '}')
Collection of the different available mailfields
$mailFields : array
The mailfields with marked keys
$markedMailFields : array
Flash messages
$messages : array
$organization
$organization : \Gems_User_Organization
Organization ID
$organizationId : integer
Project Object
$project :
$request
$request : \Zend_Controller_Request_Abstract
Staff ID
$staffId : integer
Subject of the Message
$subject : string
filename of the html template
$templateStyle : string
Collection of all the recipients of the mail
$to : array
$user
$user : \Gems_User_User