\CGExtensions\EmailEmailProcessor

An interface to define a protocol for processors of email objects.

Summary

Methods
Constants
before_send()
after_send()
on_error()
send()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

before_send()

before_send(callable  $c) : void

Optionally set a callback to be used before each message is sent.

The callback function should accept two parameters. An Email object, and an EmailDest object. It should return an email object.

Parameters

callable $c

The callback

after_send()

after_send(callable  $c) : void

Optionally set a callback to be used after each message is successfuly sent.

The callback function should accept two parameters. An Email object, and an EmailDest object. It should return an email object.

Parameters

callable $c

The callback

on_error()

on_error(callable  $c) : void

Optionally set a callback to be used when an error occurs.

The callback function should accept two parameters. An EmailDest object, and an error string.

Parameters

callable $c

The callback

send()

send() : void

The callback for sending the current email object.

It is the responsibility of the class to accept an Email object in its constructor, or otherwise.