PHP 클래스 Pimcore\Mail

상속: extends Zend_Mail
파일 보기 프로젝트 열기: pimcore/pimcore 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$forcePimcoreMode boolean 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

보호된 프로퍼티들

프로퍼티 타입 설명
$debugEmailAddresses array Contains the debug email addresses from settings -> system -> Email Settings -> Debug email addresses
$document Pimcore\Model\Document\Email Contains the email document
$enableLayoutOnPlaceholderRendering boolean if true - the layout is enabled when document is rendered to a string
$hostUrl null if $hostUrl is set - this url well be used to create absolute urls otherwise it is determined automatically
$html2textBinaryEnabled boolean use html2text from mbayer if it is installed (http://www.mbayer.de/html2text/)
$html2textInstalled boolean html2text from mbayer is installed (http://www.mbayer.de/html2text/)
$html2textOptions string Options passed to html2text
$ignoreDebugMode boolean if true - the Pimcore debug mode is ignored
$loggingEnable boolean If true - emails are logged in the database and on the file-system
$params array Contains the dynamic Params for the Placeholders
$placeholderObject Pimcore_Placeholder
$preventDebugInformationAppending boolean Prevent adding debug information
$recipientsCleared boolean
$temporaryStorage array Contains data that has to be stored temporary e.g. email receivers for logging

공개 메소드들

메소드 설명
__construct ( null $charset = null )
addBcc ( string | array $email ) : Mail Adds Bcc recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
addCc ( string | array $email, string $name = '' ) : Pimcore_Mail Adds Cc-header and recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
addTo ( string | array $email, string $name = '' ) : Mail Adds To-header and recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
clearRecipients ( ) : Mail Clears list of recipient email addresses and resets the temporary storage
determineHtml2TextIsInstalled ( ) : boolean 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
disableLogging ( ) : Mail Disables email logging
enableHtml2textBinary ( )
enableLogging ( ) : Mail Enables email logging (by default it's enabled)
getBodyHtmlRendered ( ) : string | null Replaces the placeholders with the content and returns the rendered Html
getBodyTextRendered ( ) : string Replaces the placeholders with the content and returns the rendered text if a text was set with "$mail->setBodyText()" *
getDocument ( ) : Email Returns the Document
getEnableLayoutOnPlaceholderRendering ( ) : boolean
getHostUrl ( ) : null
getHtml2TextBinaryEnabled ( ) : boolean
getHtml2TextOptions ( ) : string Returns options for html2text
getHtml2textInstalled ( ) : boolean
getIgnoreDebugMode ( ) : boolean Checks if the Debug mode is ignored
getParam ( string | integer $key ) : mixed Returns a parameter which was set with "setParams" or "setParam"
getParams ( ) : array Returns the parameters which were set with "setParams" or "setParam"
getSubjectRendered ( ) : string Replaces the placeholders with the content and returns the rendered Subject
getTemporaryStorage ( ) : array Returns the temporary storage
init ( $type = "email" ) : void Initializes the mailer with the settings form Settings -> System -> Email Settings
isValidEmailAddress ( $emailAddress ) : boolean Static helper to validate a email address
loggingIsEnabled ( ) : boolean returns the logging status
preventDebugInformationAppending ( ) : Mail Prevents appending of debug information (used for resending emails)
send ( Zend_Mail_Transport_Abstract $transport = null ) : Mail Sends this email using the given transport or with the settings from "Settings" -> "System" -> "Email Settings"
sendWithoutRendering ( null $transport = null ) : Zend_Mail sends mail without (re)rendering the content.
setDocument ( $document )
setEnableLayoutOnPlaceholderRendering ( $value )
setFrom ( string $email, null $name = null ) : Zend_Mail
setHostUrl ( $url )
setHtml2TextOptions ( string $options = '' ) : Mail Sets options that are passed to html2text
setIgnoreDebugMode ( $value )
setParam ( string | integer $key, mixed $value ) : Mail Sets a single parameter for the email view and the Placeholders
setParams ( array $params ) : Mail Sets the parameters for the email view and the Placeholders
setSender ( string $email ) : Zend_Mail Sets From-header and sender of the message
setTo ( $email, $name = '' )
unsetParam ( string | integer $key ) : Mail Deletes a single parameter which was set with "setParams" or "setParam"
unsetParams ( array $params ) : Mail Deletes parameters which were set with "setParams" or "setParam"

보호된 메소드들

메소드 설명
addToTemporaryStorage ( string $key, string | array $email, string $name ) Helper to add receivers to the temporary storage
checkDebugMode ( )
html2Text ( $htmlContent ) : string
setDocumentSettings ( ) : Mail Sets the settings which are defined in the Document Settings (from,to,cc,bcc)

메소드 상세

__construct() 공개 메소드

public __construct ( null $charset = null )
$charset null

addBcc() 공개 메소드

Adds Bcc recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
public addBcc ( string | array $email ) : Mail
$email string | array
리턴 Mail Provides fluent interface

addCc() 공개 메소드

Adds Cc-header and recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
public addCc ( string | array $email, string $name = '' ) : Pimcore_Mail
$email string | array
$name string
리턴 Pimcore_Mail Provides fluent interface

addTo() 공개 메소드

Adds To-header and recipient, $email can be an array, or a single string address Additionally adds recipients to temporary storage
public addTo ( string | array $email, string $name = '' ) : Mail
$email string | array
$name string
리턴 Mail Provides fluent interface

addToTemporaryStorage() 보호된 메소드

Helper to add receivers to the temporary storage
protected addToTemporaryStorage ( string $key, string | array $email, string $name )
$key string
$email string | array
$name string

checkDebugMode() 보호된 메소드

protected checkDebugMode ( )

clearRecipients() 공개 메소드

Clears list of recipient email addresses and resets the temporary storage
public clearRecipients ( ) : Mail
리턴 Mail Provides fluent interface

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
public static determineHtml2TextIsInstalled ( ) : boolean
리턴 boolean

disableLogging() 공개 메소드

Disables email logging
public disableLogging ( ) : Mail
리턴 Mail Provides fluent interface

enableHtml2textBinary() 공개 메소드

enableLogging() 공개 메소드

Enables email logging (by default it's enabled)
public enableLogging ( ) : Mail
리턴 Mail Provides fluent interface

getBodyHtmlRendered() 공개 메소드

Replaces the placeholders with the content and returns the rendered Html
public getBodyHtmlRendered ( ) : string | null
리턴 string | null

getBodyTextRendered() 공개 메소드

Replaces the placeholders with the content and returns the rendered text if a text was set with "$mail->setBodyText()" *
public getBodyTextRendered ( ) : string
리턴 string

getDocument() 공개 메소드

Returns the Document
public getDocument ( ) : Email
리턴 Pimcore\Model\Document\Email | null

getEnableLayoutOnPlaceholderRendering() 공개 메소드

getHostUrl() 공개 메소드

public getHostUrl ( ) : null
리턴 null

getHtml2TextBinaryEnabled() 공개 메소드

getHtml2TextOptions() 공개 메소드

Returns options for html2text
public getHtml2TextOptions ( ) : string
리턴 string

getHtml2textInstalled() 공개 정적인 메소드

public static getHtml2textInstalled ( ) : boolean
리턴 boolean || null

getIgnoreDebugMode() 공개 메소드

Checks if the Debug mode is ignored
public getIgnoreDebugMode ( ) : boolean
리턴 boolean

getParam() 공개 메소드

Returns a parameter which was set with "setParams" or "setParam"
public getParam ( string | integer $key ) : mixed
$key string | integer
리턴 mixed

getParams() 공개 메소드

Returns the parameters which were set with "setParams" or "setParam"
public getParams ( ) : array
리턴 array

getSubjectRendered() 공개 메소드

Replaces the placeholders with the content and returns the rendered Subject
public getSubjectRendered ( ) : string
리턴 string

getTemporaryStorage() 공개 메소드

Returns the temporary storage
public getTemporaryStorage ( ) : array
리턴 array

html2Text() 보호된 메소드

protected html2Text ( $htmlContent ) : string
$htmlContent
리턴 string

init() 공개 메소드

Initializes the mailer with the settings form Settings -> System -> Email Settings
public init ( $type = "email" ) : void
리턴 void

isValidEmailAddress() 공개 정적인 메소드

Static helper to validate a email address
public static isValidEmailAddress ( $emailAddress ) : boolean
$emailAddress
리턴 boolean

loggingIsEnabled() 공개 메소드

returns the logging status
public loggingIsEnabled ( ) : boolean
리턴 boolean

preventDebugInformationAppending() 공개 메소드

Prevents appending of debug information (used for resending emails)
public preventDebugInformationAppending ( ) : Mail
리턴 Mail

send() 공개 메소드

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.
public send ( Zend_Mail_Transport_Abstract $transport = null ) : Mail
$transport Zend_Mail_Transport_Abstract
리턴 Mail Provides fluent interface

sendWithoutRendering() 공개 메소드

see also comments of send() method
public sendWithoutRendering ( null $transport = null ) : Zend_Mail
$transport null
리턴 Zend_Mail

setDocument() 공개 메소드

public setDocument ( $document )
$document

setDocumentSettings() 보호된 메소드

Sets the settings which are defined in the Document Settings (from,to,cc,bcc)
protected setDocumentSettings ( ) : Mail
리턴 Mail Provides fluent interface

setEnableLayoutOnPlaceholderRendering() 공개 메소드

public setEnableLayoutOnPlaceholderRendering ( $value )
$value

setFrom() 공개 메소드

public setFrom ( string $email, null $name = null ) : Zend_Mail
$email string
$name null
리턴 Zend_Mail

setHostUrl() 공개 메소드

public setHostUrl ( $url )
$url

setHtml2TextOptions() 공개 메소드

Sets options that are passed to html2text
public setHtml2TextOptions ( string $options = '' ) : Mail
$options string
리턴 Mail

setIgnoreDebugMode() 공개 메소드

public setIgnoreDebugMode ( $value )
$value

setParam() 공개 메소드

Sets a single parameter for the email view and the Placeholders
public setParam ( string | integer $key, mixed $value ) : Mail
$key string | integer
$value mixed
리턴 Mail Provides fluent interface

setParams() 공개 메소드

Sets the parameters for the email view and the Placeholders
public setParams ( array $params ) : Mail
$params array
리턴 Mail Provides fluent interface

setSender() 공개 메소드

Sets From-header and sender of the message
public setSender ( string $email ) : Zend_Mail
$email string
리턴 Zend_Mail Provides fluent interface

setTo() 공개 메소드

public setTo ( $email, $name = '' )

unsetParam() 공개 메소드

Deletes a single parameter which was set with "setParams" or "setParam"
public unsetParam ( string | integer $key ) : Mail
$key string | integer
리턴 Mail Provides fluent interface

unsetParams() 공개 메소드

Deletes parameters which were set with "setParams" or "setParam"
public unsetParams ( array $params ) : Mail
$params array
리턴 Mail Provides fluent interface

프로퍼티 상세

$debugEmailAddresses 보호되어 있는 정적으로 프로퍼티

Contains the debug email addresses from settings -> system -> Email Settings -> Debug email addresses
protected static array $debugEmailAddresses
리턴 array

$document 보호되어 있는 프로퍼티

Contains the email document
protected Email,Pimcore\Model\Document $document
리턴 Pimcore\Model\Document\Email

$enableLayoutOnPlaceholderRendering 보호되어 있는 프로퍼티

if true - the layout is enabled when document is rendered to a string
protected bool $enableLayoutOnPlaceholderRendering
리턴 boolean

$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
public static bool $forcePimcoreMode
리턴 boolean

$hostUrl 보호되어 있는 프로퍼티

if $hostUrl is set - this url well be used to create absolute urls otherwise it is determined automatically
또한 보기: MailHelper::setAbsolutePaths()
protected null $hostUrl
리턴 null

$html2textBinaryEnabled 보호되어 있는 프로퍼티

use html2text from mbayer if it is installed (http://www.mbayer.de/html2text/)
protected bool $html2textBinaryEnabled
리턴 boolean

$html2textInstalled 보호되어 있는 정적으로 프로퍼티

html2text from mbayer is installed (http://www.mbayer.de/html2text/)
protected static bool $html2textInstalled
리턴 boolean

$html2textOptions 보호되어 있는 프로퍼티

Options passed to html2text
protected string $html2textOptions
리턴 string

$ignoreDebugMode 보호되어 있는 프로퍼티

if true - the Pimcore debug mode is ignored
protected bool $ignoreDebugMode
리턴 boolean

$loggingEnable 보호되어 있는 프로퍼티

If true - emails are logged in the database and on the file-system
protected bool $loggingEnable
리턴 boolean

$params 보호되어 있는 프로퍼티

Contains the dynamic Params for the Placeholders
protected array $params
리턴 array

$placeholderObject 보호되어 있는 프로퍼티

Pimcore_Placeholder
protected $placeholderObject

$preventDebugInformationAppending 보호되어 있는 프로퍼티

Prevent adding debug information
protected bool $preventDebugInformationAppending
리턴 boolean

$recipientsCleared 보호되어 있는 프로퍼티

protected bool $recipientsCleared
리턴 boolean

$temporaryStorage 보호되어 있는 프로퍼티

Contains data that has to be stored temporary e.g. email receivers for logging
protected array $temporaryStorage
리턴 array