class Mail extends Swift_Message (View source)
Properties
static protected bool | $forceDebugMode | ||
static protected array | $debugEmailAddresses | Contains the debug email addresses from settings -> system -> Email Settings -> Debug email addresses | |
protected Placeholder | $placeholderObject | ||
protected bool | $loggingEnable | If true - emails are logged in the database and on the file-system | |
protected Email | $document | Contains the email document | |
protected array | $params | Contains the dynamic Params for the Placeholders | |
static protected bool | $html2textInstalled | html2text from mbayer is installed (http://www.mbayer.de/html2text/) | |
protected string | $html2textOptions | Options passed to html2text | |
protected bool | $html2textBinaryEnabled | use html2text from mbayer if it is installed (http://www.mbayer.de/html2text/) | |
protected bool | $preventDebugInformationAppending | Prevent adding debug information | |
protected bool | $ignoreDebugMode | if true - the Pimcore debug mode is ignored | |
protected bool | $enableLayoutOnPlaceholderRendering | if true - the layout is enabled when document is rendered to a string | |
static bool | $forcePimcoreMode | forces the mail class to always us the "Pimcore Mode", so you don't have to set the charset every time when you create new Pimcore_Mail instance | |
protected null | $hostUrl | if $hostUrl is set - this url well be used to create absolute urls otherwise it is determined automatically | |
protected bool | $recipientsCleared | if true: prevent setting the recipients from the Document - set in $this->clearRecipients() | |
protected string | $bodyText | body plain text | |
protected Swift_MimePart | $bodyTextMimePart | plain text mime part this is created and attached to mail on send | |
protected array | $originalData | place to store original data before modifying message when sending in debug mode | |
protected Log | $lastLogEntry |
Methods
No description
No description
Mail constructor.
Initializes the mailer with the settings form Settings -> System -> Email Settings
No description
Checks if the Debug mode is ignored
returns if redirecting to debug mail addresses should take place when sending the mail
No description
No description
Determines if mbayer html2text is installed (more information at http://www.mbayer.de/html2text/) and uses it to automatically create a text version of the html email
Sets options that are passed to html2text
Returns options for html2text
Clears list of recipient email addresses
Disables email logging
Enables email logging (by default it's enabled)
returns the logging status
Sets a single parameter for the email view and the Placeholders
Returns the parameters which were set with "setParams" or "setParam"
Returns a parameter which was set with "setParams" or "setParam"
Forces the debug mode - useful for cli-script which should not send emails to recipients
Deletes parameters which were set with "setParams" or "setParam"
Deletes a single parameter which was set with "setParams" or "setParam"
Sets the settings which are defined in the Document Settings (from,to,cc,bcc,replyTo)
Sends this email using the given transport or with the settings from "Settings" -> "System" -> "Email Settings"
sends mail without (re)rendering the content.
Static helper to validate a email address
Replaces the placeholders with the content and returns the rendered Subject
Replaces the placeholders with the content and returns the rendered Html
Replaces the placeholders with the content and returns the rendered text if a text was set with "$mail->setBodyText()"
No description
Returns the Document
Prevents appending of debug information (used for resending emails)
Returns, if debug information is not added
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 165
$this
setHostUrl($url)
at line 175
null
getHostUrl()
at line 188
__construct(null $subject = null, null $body = null, null $contentType = null, null $charset = null)
Mail constructor.
at line 217
init(string $type = 'email')
Initializes the mailer with the settings form Settings -> System -> Email Settings
at line 242
$this
setIgnoreDebugMode($value)
at line 254
bool
getIgnoreDebugMode()
Checks if the Debug mode is ignored
at line 264
bool
doRedirectMailsToDebugMailAddresses()
returns if redirecting to debug mail addresses should take place when sending the mail
at line 278
$this
setEnableLayoutOnPlaceholderRendering($value)
at line 288
bool
getEnableLayoutOnPlaceholderRendering()
at line 301
static bool
determineHtml2TextIsInstalled()
Determines if mbayer html2text is installed (more information at http://www.mbayer.de/html2text/) and uses it to automatically create a text version of the html email
at line 313
Mail
setHtml2TextOptions(string $options = '')
Sets options that are passed to html2text
at line 329
string
getHtml2TextOptions()
Returns options for html2text
at line 378
bool
loggingIsEnabled()
returns the logging status
at line 390
Mail
setParams(array $params)
Sets the parameters for the email view and the Placeholders
at line 407
Mail
setParam(string $key, mixed $value)
Sets a single parameter for the email view and the Placeholders
at line 423
array
getParams()
Returns the parameters which were set with "setParams" or "setParam"
at line 435
mixed
getParam(string $key)
Returns a parameter which was set with "setParams" or "setParam"
at line 445
static
setForceDebugMode(bool $value)
Forces the debug mode - useful for cli-script which should not send emails to recipients
at line 457
Mail
unsetParams(array $params)
Deletes parameters which were set with "setParams" or "setParam"
at line 473
Mail
unsetParam(string $key)
Deletes a single parameter which was set with "setParams" or "setParam"
at line 489
protected Mail
setDocumentSettings()
Sets the settings which are defined in the Document Settings (from,to,cc,bcc,replyTo)
at line 560
Mail
send(Swift_Mailer $mailer = null)
Sends this email using the given transport or with the settings from "Settings" -> "System" -> "Email Settings"
IMPORTANT: If the debug mode is enabled in "Settings" -> "System" -> "Debug" all emails will be sent to the debug email addresses that are given in "Settings" -> "System" -> "Email Settings" -> "Debug email addresses"
set DefaultTransport or the internal mail function if no default transport had been set.
at line 590
Mail
sendWithoutRendering(Swift_Mailer $mailer = null)
sends mail without (re)rendering the content.
see also comments of send() method
at line 693
static bool
isValidEmailAddress($emailAddress)
Static helper to validate a email address
at line 705
string
getSubjectRendered()
Replaces the placeholders with the content and returns the rendered Subject
at line 721
string|null
getBodyHtmlRendered()
Replaces the placeholders with the content and returns the rendered Html
at line 755
string
getBodyTextRendered()
Replaces the placeholders with the content and returns the rendered text if a text was set with "$mail->setBodyText()"
at line 799
$this
setDocument($document)
at line 830
Mail
preventDebugInformationAppending()
Prevents appending of debug information (used for resending emails)
at line 842
bool
isPreventingDebugInformationAppending()
Returns, if debug information is not added