PHP Class Crunz\Mailer

Inheritance: extends Singleton, use trait Crunz\Configuration\Configurable
Show file Open project: lavary/crunz Class Usage Examples

Protected Properties

Property Type Description
$mailer Mailer instance

Public Methods

Method Description
__construct ( Swift_Mailer $mailer = null ) Instantiate the Mailer class
send ( string $subject, string $message ) : boolean Send an email

Protected Methods

Method Description
getMailTrasport ( ) : Swift_SendmailTransport Get the Mail transport
getMailer ( ) : Swift_Mailer Return the proper mailer
getMessage ( string $subject, string $message ) : Swift_Message Prepare a swift message object
getSendMailTransport ( ) : Swift_SendmailTransport Get the Sendmail Transport
getSmtpTransport ( ) : Swift_SmtpTransport Get the SMTP transport

Method Details

__construct() public method

Instantiate the Mailer class
public __construct ( Swift_Mailer $mailer = null )
$mailer Swift_Mailer

getMailTrasport() protected method

Get the Mail transport
protected getMailTrasport ( ) : Swift_SendmailTransport
return Swift_SendmailTransport

getMailer() protected method

Return the proper mailer
protected getMailer ( ) : Swift_Mailer
return Swift_Mailer

getMessage() protected method

Prepare a swift message object
protected getMessage ( string $subject, string $message ) : Swift_Message
$subject string
$message string
return Swift_Message

getSendMailTransport() protected method

Get the Sendmail Transport
protected getSendMailTransport ( ) : Swift_SendmailTransport
return Swift_SendmailTransport

getSmtpTransport() protected method

Get the SMTP transport
protected getSmtpTransport ( ) : Swift_SmtpTransport
return Swift_SmtpTransport

send() public method

Send an email
public send ( string $subject, string $message ) : boolean
$subject string
$message string
return boolean

Property Details

$mailer protected property

Mailer instance
protected $mailer