PHP Класс GBMail, gitblog

Configuration is stored in data/email.json. Example of Google Mail SMTP delivery: { "admin": ["Your Self", "[email protected]"], "smtp": { "secure": "ssl", "host": "smtp.gmail.com", "port": 465, "username": "[email protected]", "password": "secret" } } Example of sending mail using the convenience method "compose": GBMail::compose('Hello', 'This is a mail', array('John Doe', '[email protected]'))->send();
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$conf
$default_from
$mailer

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

Метод Описание
__construct ( $subject = null, $textbody = null )
addAddress ( $var, $type = 'to' )
authorizedFromAddress ( )
compose ( $subject, $textbody, $to = null, $from = null )
formatAddress ( $addr )
mkmailer ( )
needAuthorizedFromAddress ( )
normalizeRecipient ( $v ) # returns array(addr, name | "")
rawRecipients ( )
send ( $deferred = null ) Send the mail.
setDefaultConfig ( )
setFrom ( $var )

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

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

public __construct ( $subject = null, $textbody = null )

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

public addAddress ( $var, $type = 'to' )

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

compose() статический публичный Метод

static public compose ( $subject, $textbody, $to = null, $from = null )

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

public formatAddress ( $addr )

mkmailer() статический публичный Метод

static public mkmailer ( )

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

normalizeRecipient() статический публичный Метод

# returns array(addr, name | "")
static public normalizeRecipient ( $v )

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

public rawRecipients ( )

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

$deferred defaults to true if delivery subsystem is SMTP, otherwise default is false (not using delay execution).
public send ( $deferred = null )

setDefaultConfig() статический публичный Метод

static public setDefaultConfig ( )

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

public setFrom ( $var )

Описание свойств

$conf публичное статическое свойство

public static $conf

$default_from публичное статическое свойство

public static $default_from

$mailer публичное свойство

public $mailer