Skip to content

TestMailer

Type
Class
Namespace
craft\test
Inherits
craft\test\TestMailer » craft\mail\Mailer » yii\symfonymailer\Mailer
Since
3.2.0

Exactly the same as Codeception\Lib\Connector\Yii2\TestMailer except that we override based on Crafts own mailer class.

View source

Public Properties

PropertyDescription
callbackcallable
from
messageClassstring
replyTostring, array, craft\elements\User, craft\elements\User[], null – The default Reply-To email address, or their user model(s).
templatestring, null – The email template that should be used

callback

Type
callable
Default value
null

View source

from

Default value
'test@test.craft'

View source

messageClass

Type
string
Default value
\craft\mail\Message::class

View source

Public Methods

MethodDescription
composeFromKey()Composes a new email based on a given key.
send()

Protected Methods

MethodDescription
saveMessage()
sendMessage()

saveMessage()

View source

Arguments

  • $message

sendMessage()

View source

Arguments

  • $message