PHP Класс Jyxo\Mail\Sender

Based on PhpMailer class (C) Copyright 2001-2003 Brent R. Matzelle
Автор: Jaroslav Hanslík
Показать файл Открыть проект

Открытые методы

Метод Описание
getCharset ( ) : string Returns charset.
getEmail ( ) : Email | null Returns the email to be sent.
getEncoding ( ) : string Returns encoding.
getHostname ( ) : string Returns hostname.
getXmailer ( ) : string Returns X-Mailer header value.
send ( string $mode ) : Result Sends an email using the given mode.
setCharset ( string $charset ) : self Sets charset.
setEmail ( Email $email ) : self Sets the email to be sent.
setEncoding ( string $encoding ) : self Sets encoding.
setHostname ( string $hostname ) : self Sets hostname.
setSmtp ( string $host, integer $port = 25, string $helo = '', string $user = '', string $password = '', integer $timeout = 5 ) : self Sets SMTP parameters.
setXmailer ( string $xmailer ) : self Sets X-Mailer header value.

Приватные методы

Метод Описание
addHeaderLine ( string $name, string $value ) Adds a header line.
attachAll ( ) : string Adds all attachments to the email.
changeCharset ( string $string ) : string Converts a string from UTF-8 into the email encoding.
clearHeaderValue ( string $string ) : string Clears headers from line endings.
create ( ) Creates an email.
createBody ( ) Creates body.
createHeader ( ) Creates header.
encodeHeader ( string $string ) : string Encodes headers.
encodeString ( string $string, string $encoding, integer $lineLength = self::LINE_LENGTH ) : string Encodes a string using the given encoding.
formatAddress ( Address $address ) : string Formats an email address.
formatAddressList ( array $addressList ) : string Formats a list of addresses.
getBoundaryEnd ( string $boundary ) : string Returns an end of an email part.
getBoundaryStart ( string $boundary, string $contentType, string $charset, string $encoding ) : string Returns a beginning of an email part.
getHeader ( array $except = [] ) : string Returns headers except given lines.
sendByMail ( ) Sends an email using the mail() function.
sendBySmtp ( ) Sends an email using a SMTP server.

Описание методов

getCharset() публичный Метод

Returns charset.
public getCharset ( ) : string
Результат string

getEmail() публичный Метод

Returns the email to be sent.
public getEmail ( ) : Email | null
Результат Email | null

getEncoding() публичный Метод

Returns encoding.
public getEncoding ( ) : string
Результат string

getHostname() публичный Метод

Returns hostname.
public getHostname ( ) : string
Результат string

getXmailer() публичный Метод

Returns X-Mailer header value.
public getXmailer ( ) : string
Результат string

send() публичный Метод

Sends an email using the given mode.
public send ( string $mode ) : Result
$mode string Sending mode
Результат Jyxo\Mail\Sender\Result

setCharset() публичный Метод

Sets charset.
public setCharset ( string $charset ) : self
$charset string Final charset
Результат self

setEmail() публичный Метод

Sets the email to be sent.
public setEmail ( Email $email ) : self
$email Email Email instance
Результат self

setEncoding() публичный Метод

Sets encoding.
public setEncoding ( string $encoding ) : self
$encoding string Encoding
Результат self

setHostname() публичный Метод

Sets hostname.
public setHostname ( string $hostname ) : self
$hostname string Hostname
Результат self

setSmtp() публичный Метод

Sets SMTP parameters.
public setSmtp ( string $host, integer $port = 25, string $helo = '', string $user = '', string $password = '', integer $timeout = 5 ) : self
$host string Hostname
$port integer Port
$helo string HELO value
$user string Username
$password string Password
$timeout integer Connection timeout
Результат self

setXmailer() публичный Метод

Sets X-Mailer header value.
public setXmailer ( string $xmailer ) : self
$xmailer string X-Mailer header value
Результат self