PHP 클래스 Swift_Transport_MailTransport

It is advised that users do not use this transport if at all possible since a number of plugin features cannot be used in conjunction with this transport due to the internal interface in PHP itself. The level of error reporting with this transport is incredibly weak, again due to limitations of PHP's internal mail() function. You'll get an all-or-nothing result from sending.
저자: Chris Corbyn
상속: implements Swift_Transport
파일 보기 프로젝트 열기: swiftmailer/swiftmailer

공개 메소드들

메소드 설명
__construct ( Swift_Events_EventDispatcher $eventDispatcher ) Create a new MailTransport with the $log.
getExtraParams ( ) : string Get the additional parameters used on the mail() function.
isStarted ( ) Not used.
mail ( string $to, string $subject, string $body, string $headers = null, string $extraParams = null ) : boolean Send mail via the mail() function.
registerPlugin ( Swift_Events_EventListener $plugin ) Register a plugin.
send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer Send the given Message.
setExtraParams ( string $params ) : Swift_Transport_MailTransport Set the additional parameters used on the mail() function.
start ( ) Not used.
stop ( ) Not used.

보호된 메소드들

메소드 설명
throwException ( Swift_TransportException $e ) Throw a TransportException, first sending it to any listeners

비공개 메소드들

메소드 설명
formatExtraParams ( $extraParams, $reversePath ) : string | null Return php mail extra params to use for invoker->mail.
getReversePath ( Swift_Mime_Message $message ) Determine the best-use reverse path for this message

메소드 상세

__construct() 공개 메소드

Create a new MailTransport with the $log.
public __construct ( Swift_Events_EventDispatcher $eventDispatcher )
$eventDispatcher Swift_Events_EventDispatcher

getExtraParams() 공개 메소드

This string is formatted for sprintf() where %s is the sender address.
public getExtraParams ( ) : string
리턴 string

isStarted() 공개 메소드

Not used.
public isStarted ( )

mail() 공개 메소드

This method takes the same arguments as PHP mail().
public mail ( string $to, string $subject, string $body, string $headers = null, string $extraParams = null ) : boolean
$to string
$subject string
$body string
$headers string
$extraParams string
리턴 boolean

registerPlugin() 공개 메소드

Register a plugin.
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener

send() 공개 메소드

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
public send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer
$message Swift_Mime_Message
$failedRecipients string[] An array of failures by-reference
리턴 integer

setExtraParams() 공개 메소드

This string is formatted for sprintf() where %s is the sender address.
public setExtraParams ( string $params ) : Swift_Transport_MailTransport
$params string
리턴 Swift_Transport_MailTransport

start() 공개 메소드

Not used.
public start ( )

stop() 공개 메소드

Not used.
public stop ( )

throwException() 보호된 메소드

Throw a TransportException, first sending it to any listeners
protected throwException ( Swift_TransportException $e )
$e Swift_TransportException