class MailgunDriver implements DriverInterface

Methods

array
availableSettings()

<p>Provide a list of settings for this driver.</p>

MessageBag
validate(SettingsRepositoryInterface $settings, Factory $validator)

<p>Ensure the given settings are enough to send emails.</p>

bool
canSend()

<p>Does this driver actually send out emails?</p>

Swift_Transport
buildTransport(SettingsRepositoryInterface $settings)

<p>Build a mail transport based on Flarum's current settings.</p>

Details

array availableSettings()

<p>Provide a list of settings for this driver.</p>

<p>The list must be an array of field names (keys) mapping to their type (the empty string &quot;&quot; for a text field; or an array of possible values for a dropdown field).</p>

Return Value

array

MessageBag validate(SettingsRepositoryInterface $settings, Factory $validator)

<p>Ensure the given settings are enough to send emails.</p>

<p>This method is responsible for determining whether the user-provided values stored in Flarum's settings are &quot;valid&quot; as far as a simple inspection of these values can determine it. Of course, this does not mean that the mail server or API will actually accept e.g. credentials.</p> <p>Any errors must be wrapped in a {\Illuminate\Support\MessageBag}. If there are no errors, an empty instance can be returned. In the presence of validation problems with the configured mail driver, Flarum will fall back to its no-op {\Flarum\Mail\NullDriver}.</p>

Parameters

SettingsRepositoryInterface $settings
Factory $validator

Return Value

MessageBag

bool canSend()

<p>Does this driver actually send out emails?</p>

Return Value

bool

Swift_Transport buildTransport(SettingsRepositoryInterface $settings)

<p>Build a mail transport based on Flarum's current settings.</p>

Parameters

SettingsRepositoryInterface $settings

Return Value

Swift_Transport