PHP 클래스 Gdn_Email, vanilla

All public methods return $this for chaining purposes. ie. $Email->Subject('Hi')->Message('Just saying hi!')- To('[email protected]')->Send();
상속: extends Gdn_Pluggable
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$PhpMailer PHPMailer
$Skipped Recipients that were skipped because they lack permission.
$supportedFormats The supported email formats.

보호된 프로퍼티들

프로퍼티 타입 설명
$emailTemplate The email body renderer. Use this to edit the email body.
$format The format of the email.

공개 메소드들

메소드 설명
__construct ( ) Constructor.
addHeader ( string $Name, string $Value ) : Gdn_Email Add a custom header to the outgoing email.
addTo ( $RecipientEmail, $RecipientName = '' )
bcc ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email Adds to the "Bcc" recipient collection.
cc ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email Adds to the "Cc" recipient collection.
charset ( $Use = '' )
clear ( ) : Gdn_Email Clears out all previously specified values for this object and restores it to the state it was in when it was instantiated.
formatMessage ( $message )
from ( string $SenderEmail = '', string $SenderName = '', boolean $bOverrideSender = false ) : Gdn_Email Allows the explicit definition of the email's sender address & name.
getEmailTemplate ( ) : EmailTemplate
getFormat ( ) : string Get email format
getHTMLVersion ( $template ) : mixed | string
getTextVersion ( $template ) : boolean | mixed | string
masterView ( string $MasterView ) : Gdn_Email Allows the definition of a masterview other than the default: "email.master".
message ( string $message, boolean $convertNewlines = true, boolean $filter = true ) : Gdn_Email The message to be sent.
mimeType ( string $MimeType ) : Gdn_Email Sets the mime-type of the email.
send ( string $EventName = '' ) : boolean
setEmailTemplate ( EmailTemplate $emailTemplate ) : Gdn_Email
setFormat ( string $format ) : Gdn_Email Sets the format property, the email mime type and the email template format property.
subject ( string $Subject ) : Gdn_Email Adds subject of the message to the email.
to ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email Adds to the "To" recipient collection.

보호된 메소드들

메소드 설명
resolveFormat ( ) Sets the format property based on the config, and defaults to html.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

addHeader() 공개 메소드

Add a custom header to the outgoing email.
부터: 2.1
public addHeader ( string $Name, string $Value ) : Gdn_Email
$Name string
$Value string
리턴 Gdn_Email

addTo() 공개 메소드

public addTo ( $RecipientEmail, $RecipientName = '' )

bcc() 공개 메소드

Adds to the "Bcc" recipient collection.
public bcc ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email
$RecipientEmail mixed An email (or array of emails) to add to the "Bcc" recipient collection.
$RecipientName string The recipient name associated with $RecipientEmail. If $RecipientEmail is an array of email addresses, this value will be ignored.
리턴 Gdn_Email

cc() 공개 메소드

Adds to the "Cc" recipient collection.
public cc ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email
$RecipientEmail mixed An email (or array of emails) to add to the "Cc" recipient collection.
$RecipientName string The recipient name associated with $RecipientEmail. If $RecipientEmail is an array of email addresses, this value will be ignored.
리턴 Gdn_Email

charset() 공개 메소드

public charset ( $Use = '' )

clear() 공개 메소드

Clears out all previously specified values for this object and restores it to the state it was in when it was instantiated.
public clear ( ) : Gdn_Email
리턴 Gdn_Email

formatMessage() 공개 메소드

public formatMessage ( $message )

from() 공개 메소드

Defaults to the applications Configuration 'SupportEmail' & 'SupportName' settings respectively.
public from ( string $SenderEmail = '', string $SenderName = '', boolean $bOverrideSender = false ) : Gdn_Email
$SenderEmail string
$SenderName string
$bOverrideSender boolean optional. default false.
리턴 Gdn_Email

getEmailTemplate() 공개 메소드

public getEmailTemplate ( ) : EmailTemplate
리턴 EmailTemplate The email body renderer.

getFormat() 공개 메소드

Returns 'text' or 'html'.
public getFormat ( ) : string
리턴 string

getHTMLVersion() 공개 정적인 메소드

public static getHTMLVersion ( $template ) : mixed | string
$template
리턴 mixed | string

getTextVersion() 공개 정적인 메소드

public static getTextVersion ( $template ) : boolean | mixed | string
$template
리턴 boolean | mixed | string

masterView() 공개 메소드

Allows the definition of a masterview other than the default: "email.master".
사용 중단: since version 2.2
public masterView ( string $MasterView ) : Gdn_Email
$MasterView string
리턴 Gdn_Email

message() 공개 메소드

The message to be sent.
public message ( string $message, boolean $convertNewlines = true, boolean $filter = true ) : Gdn_Email
$message string The body of the message to be sent.
$convertNewlines boolean Optional. Convert newlines to br tags
$filter boolean Optional. Filter HTML.
리턴 Gdn_Email

mimeType() 공개 메소드

Only accept text/plain or text/html.
public mimeType ( string $MimeType ) : Gdn_Email
$MimeType string The mime-type of the email.
리턴 Gdn_Email

resolveFormat() 보호된 메소드

Sets the format property based on the config, and defaults to html.
protected resolveFormat ( )

send() 공개 메소드

public send ( string $EventName = '' ) : boolean
$EventName string
리턴 boolean

setEmailTemplate() 공개 메소드

public setEmailTemplate ( EmailTemplate $emailTemplate ) : Gdn_Email
$emailTemplate EmailTemplate The email body renderer.
리턴 Gdn_Email

setFormat() 공개 메소드

Sets the format property, the email mime type and the email template format property.
public setFormat ( string $format ) : Gdn_Email
$format string The format of the email. Must be in the $supportedFormats array.
리턴 Gdn_Email

subject() 공개 메소드

Adds subject of the message to the email.
public subject ( string $Subject ) : Gdn_Email
$Subject string The subject of the message.
리턴 Gdn_Email

to() 공개 메소드

Adds to the "To" recipient collection.
public to ( mixed $RecipientEmail, string $RecipientName = '' ) : Gdn_Email
$RecipientEmail mixed An email (or array of emails) to add to the "To" recipient collection.
$RecipientName string The recipient name associated with $RecipientEmail. If $RecipientEmail is an array of email addresses, this value will be ignored.
리턴 Gdn_Email

프로퍼티 상세

$PhpMailer 공개적으로 프로퍼티

public PHPMailer $PhpMailer
리턴 PHPMailer

$Skipped 공개적으로 프로퍼티

Recipients that were skipped because they lack permission.
public $Skipped

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

The email body renderer. Use this to edit the email body.
protected $emailTemplate

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

The format of the email.
protected $format

$supportedFormats 공개적으로 정적으로 프로퍼티

The supported email formats.
public static $supportedFormats