PHP Class Mailer

Since: 5.0.0
Author: Al Brookbanks
Inheritance: extends PHPMailer
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Свойство Type Description
$divert array Addresses to which we should divert emails to. If empty then no diversion.
$host Configuration for SMTP.
$mode string Can be mail, smtp, sendmail. If empty then mail is disabled and messages are dropped silently.
$password
$port
$security SSL or TLS.
$sendmail_command
$username

Protected Properties

Свойство Type Description
$_mailer
$_transport

Méthodes publiques

Méthode Description
init ( ) Initialise the component by pulling in the appropriate SwiftMailer classes.
mail ( array $to, string $subject, string $body, array $from ) : boolean Mailer:mail is intended as a more robust simple replacement for php mail(),.
newMessage ( ) : Swift_Message Instantiate an appropriate SwiftMailer email message object.
sendMessage ( Swift_Message $message ) : boolean Send an email.

Méthodes protégées

Méthode Description
censorMessage ( Swift_Message $message ) : Swift_Message If we deem a mail address to be insecure, we should censor the message, otherwise returns intact.
directlySendMessage ( Swift_Message $message ) : boolean Sends a message to the recipient, censors if they are forbidden.
divertMessage ( Swift_Message $message ) : boolean Diverts an email from its original destination. Useful for testing things in nearlive.
getMailer ( ) : Swift_Mailer Get the SwiftMailer object with the configured transport.
getTransport ( ) : Transport return the transport object for the configured mail type.
recipientForbidden ( Swift_Message $message ) : boolean Checks the email recipients are in domains that are allowed.

Method Details

censorMessage() protected méthode

If we deem a mail address to be insecure, we should censor the message, otherwise returns intact.
protected censorMessage ( Swift_Message $message ) : Swift_Message
$message Swift_Message
Résultat Swift_Message

directlySendMessage() protected méthode

Sends a message to the recipient, censors if they are forbidden.
protected directlySendMessage ( Swift_Message $message ) : boolean
$message Swift_Message
Résultat boolean

divertMessage() protected méthode

Diverts an email from its original destination. Useful for testing things in nearlive.
protected divertMessage ( Swift_Message $message ) : boolean
$message Swift_Message
Résultat boolean

getMailer() protected méthode

Get the SwiftMailer object with the configured transport.
protected getMailer ( ) : Swift_Mailer
Résultat Swift_Mailer

getTransport() protected méthode

return the transport object for the configured mail type.
protected getTransport ( ) : Transport
Résultat Transport object

init() public méthode

Initialise the component by pulling in the appropriate SwiftMailer classes.
public init ( )

mail() public static méthode

Mailer:mail is intended as a more robust simple replacement for php mail(),.
public static mail ( array $to, string $subject, string $body, array $from ) : boolean
$to array address eg array('[email protected]'=>'OpenEyes')
$subject string
$body string
$from array address eg array('[email protected]'=>'OpenEyes')
Résultat boolean mail sent without error

newMessage() public méthode

Instantiate an appropriate SwiftMailer email message object.
public newMessage ( ) : Swift_Message
Résultat Swift_Message

recipientForbidden() protected méthode

Checks the email recipients are in domains that are allowed.
protected recipientForbidden ( Swift_Message $message ) : boolean
$message Swift_Message
Résultat boolean

sendMessage() public méthode

Send an email.
public sendMessage ( Swift_Message $message ) : boolean
$message Swift_Message
Résultat boolean

Property Details

$_mailer protected_oe property

protected $_mailer

$_transport protected_oe property

protected $_transport

$divert public_oe property

Addresses to which we should divert emails to. If empty then no diversion.
public array $divert
Résultat array

$host public_oe property

Configuration for SMTP.
public $host

$mode public_oe property

Can be mail, smtp, sendmail. If empty then mail is disabled and messages are dropped silently.
public string $mode
Résultat string

$password public_oe property

public $password

$port public_oe property

public $port

$security public_oe property

SSL or TLS.
public $security

$sendmail_command public_oe property

public $sendmail_command

$username public_oe property

public $username