Skip to content

TransportAdapterInterface ​

Type
Interface
Namespace
craft\mail\transportadapters
Extends
craft\base\ConfigurableComponentInterface
Implemented by
craft\mail\transportadapters\BaseTransportAdapter, craft\mail\transportadapters\Gmail, craft\mail\transportadapters\Sendmail, craft\mail\transportadapters\Smtp
Since
3.0.0

TransportAdapterInterface defines the common interface to be implemented by Symfony Mailer transport adapter classes.

View source

Public Methods ​

MethodDescription
defineTransport()Returns the config array or an implementation of AbstractTransport object that should be passed to \craft\mail\Mailer::setTransport().
displayName()Returns the display name of this class.
extraFields()Returns the list of additional fields that can be returned by toArray() in addition to those listed in fields().
fields()Returns the list of fields that should be returned by default by toArray() when no specific fields are specified.
getSettings()Returns an array of the component’s settings.
getSettingsHtml()Returns the component’s settings HTML.
instance()Returns static class instance, which can be used to obtain meta information.
isSelectable()Returns whether the component should be selectable in component Type selects.
settingsAttributes()Returns the list of settings attribute names.
toArray()Converts the object into an array.

defineTransport() ​

Returns the config array or an implementation of AbstractTransport object that should be passed to \craft\mail\Mailer::setTransport().

View source

Returns ​

array, \Symfony\Component\Mailer\Transport\AbstractTransport