PHP Class yupe\components\Mail

Inheritance: extends CApplicationComponen\CApplicationComponent
Afficher le fichier Open project: yupe/yupe Class Usage Examples

Méthodes publiques

Свойство Type Description
$layout string Layout of the email body
$method string Method to send mail: ("mail", "sendmail", or "smtp").
$smtp array array( 'host' => 'example.com', 'username' => 'username', 'password' => '*******' );

Méthodes publiques

Méthode Description
addAddress ( $address, string $name = '' )
getMailer ( ) : PHPMailer
getSubject ( ) : string
init ( )
reset ( )
send ( string $from, string | array $to, string $theme, string $body, boolean $isText = false, array $replyTo = [] ) : boolean Функция отправки сообщения:
setFrom ( $address, string $name = '' )
setSubject ( $subject )

Method Details

addAddress() public méthode

public addAddress ( $address, string $name = '' )
$address
$name string

getMailer() public méthode

public getMailer ( ) : PHPMailer
Résultat PHPMailer

getSubject() public méthode

public getSubject ( ) : string
Résultat string

init() public méthode

public init ( )

reset() public méthode

public reset ( )

send() public méthode

Функция отправки сообщения:
public send ( string $from, string | array $to, string $theme, string $body, boolean $isText = false, array $replyTo = [] ) : boolean
$from string - адрес отправителя
$to string | array - адрес(-а) получателя
$theme string - тема письма
$body string - тело письма
$isText boolean - является ли тело письма текстом
$replyTo array добавляет заголовок Reply-To, формат [email => имя]
Résultat boolean отправилось ли письмо

setFrom() public méthode

public setFrom ( $address, string $name = '' )
$address
$name string

setSubject() public méthode

public setSubject ( $subject )
$subject

Property Details

$layout public_oe property

Layout of the email body
public string $layout
Résultat string

$method public_oe property

Method to send mail: ("mail", "sendmail", or "smtp").
public string $method
Résultat string

$smtp public_oe property

array( 'host' => 'example.com', 'username' => 'username', 'password' => '*******' );
public array $smtp
Résultat array