Метод | Описание | |
---|---|---|
__construct ( Zend\Mail\Message $message, Zend\Mail\Transport\TransportInterface $transport, Zend\View\Renderer\RendererInterface $renderer ) | Creates a new MailService | |
addAttachment ( string $path, string | null $filename = null ) | ||
addAttachments ( array $paths ) | ||
attachMailListener ( AcMailer\Event\MailListenerInterface $mailListener, integer $priority = 1 ) : mixed | void | Attaches a new MailListenerInterface | |
detachMailListener ( AcMailer\Event\MailListenerInterface $mailListener ) | Detaches provided MailListener | |
getAttachments ( ) : array | Returns the list of attachments | |
getEventManager ( ) : Zend\EventManager\EventManagerInterface | Retrieve the event manager Lazy-loads an EventManager instance if none registered. | |
getMessage ( ) : Zend\Mail\Message | Returns this service's message | |
getRenderer ( ) : Zend\View\Renderer\RendererInterface | Returns the renderer object that will be used to render templates | |
getTransport ( ) : Zend\Mail\Transport\TransportInterface | Returns the transport object that will be used to send the wrapped message | |
send ( ) : AcMailer\Result\ResultInterface | Sends the mail | |
setAttachments ( array $paths ) | ||
setBody ( Zend\Mime\Part | Zend\Mime\Message | string $body, string $charset = null ) | Sets the message body | |
setDefaultLayout ( AcMailer\View\DefaultLayoutInterface $layout = null ) : mixed | Sets the default layout to be used with all the templates set when calling setTemplate. | |
setEventManager ( Zend\EventManager\EventManagerInterface $events ) | Inject an EventManager instance | |
setRenderer ( Zend\View\Renderer\RendererInterface $renderer ) | ||
setSubject ( string $subject ) | Sets the message subject | |
setTemplate ( string | Zend\View\Model\ViewModel $template, array $params = [] ) | Sets the body of this message from a template | |
setTransport ( Zend\Mail\Transport\TransportInterface $transport ) |
Метод | Описание | |
---|---|---|
attachFiles ( ) | Attaches files to the message if any | |
createMailEvent ( string $name = MailEvent::EVENT_MAIL_PRE_SEND, AcMailer\Result\ResultInterface $result = null ) : AcMailer\Event\MailEvent | Creates a new MailEvent object | |
createMailResultFromException ( Exception $e ) : AcMailer\Result\MailResult | Creates a error MailResult from an exception | |
renderChildren ( Zend\View\Model\ViewModel $model ) | Renders template childrens. |
public __construct ( Zend\Mail\Message $message, Zend\Mail\Transport\TransportInterface $transport, Zend\View\Renderer\RendererInterface $renderer ) | ||
$message | Zend\Mail\Message | |
$transport | Zend\Mail\Transport\TransportInterface | |
$renderer | Zend\View\Renderer\RendererInterface | Renderer used to render templates, typically a PhpRenderer |
protected createMailEvent ( string $name = MailEvent::EVENT_MAIL_PRE_SEND, AcMailer\Result\ResultInterface $result = null ) : AcMailer\Event\MailEvent | ||
$name | string | |
$result | AcMailer\Result\ResultInterface | |
Результат | AcMailer\Event\MailEvent |
protected createMailResultFromException ( Exception $e ) : AcMailer\Result\MailResult | ||
$e | Exception | |
Результат | AcMailer\Result\MailResult |
public detachMailListener ( AcMailer\Event\MailListenerInterface $mailListener ) | ||
$mailListener | AcMailer\Event\MailListenerInterface |
public getAttachments ( ) : array | ||
Результат | array |
public getEventManager ( ) : Zend\EventManager\EventManagerInterface | ||
Результат | Zend\EventManager\EventManagerInterface |
public getMessage ( ) : Zend\Mail\Message | ||
Результат | Zend\Mail\Message |
public getRenderer ( ) : Zend\View\Renderer\RendererInterface | ||
Результат | Zend\View\Renderer\RendererInterface |
public getTransport ( ) : Zend\Mail\Transport\TransportInterface | ||
Результат | Zend\Mail\Transport\TransportInterface |
protected renderChildren ( Zend\View\Model\ViewModel $model ) | ||
$model | Zend\View\Model\ViewModel |
public send ( ) : AcMailer\Result\ResultInterface | ||
Результат | AcMailer\Result\ResultInterface |
public setDefaultLayout ( AcMailer\View\DefaultLayoutInterface $layout = null ) : mixed | ||
$layout | AcMailer\View\DefaultLayoutInterface | |
Результат | mixed |
public setEventManager ( Zend\EventManager\EventManagerInterface $events ) | ||
$events | Zend\EventManager\EventManagerInterface |
public setRenderer ( Zend\View\Renderer\RendererInterface $renderer ) | ||
$renderer | Zend\View\Renderer\RendererInterface |
public setSubject ( string $subject ) | ||
$subject | string | The subject of the message |
public setTemplate ( string | Zend\View\Model\ViewModel $template, array $params = [] ) | ||
$template | string | Zend\View\Model\ViewModel | |
$params | array |
public setTransport ( Zend\Mail\Transport\TransportInterface $transport ) | ||
$transport | Zend\Mail\Transport\TransportInterface |