class PostmarkDriver implements DriverInterface
Traits
Methods
Returns a validation rule that checks for leading or trailing whitespace.
Ensure the given settings are enough to send emails.
Build a mail transport based on Flarum's current settings.
Details
in ValidatesMailSettings
at
line 19
protected callable
noWhitespace()
Returns a validation rule that checks for leading or trailing whitespace.
at
line 23
array
availableSettings()
Provide a list of settings for this driver.
The list must be an array of field names (keys) mapping to their type (the empty string "" for a text field; or an array of possible values for a dropdown field).
at
line 31
MessageBag
validate(SettingsRepositoryInterface $settings, Factory $validator)
Ensure the given settings are enough to send emails.
This method is responsible for determining whether the user-provided values stored in Flarum's settings are "valid" 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. 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}.
at
line 39
bool
canSend()
Does this driver actually send out emails?
at
line 44
TransportInterface
buildTransport(SettingsRepositoryInterface $settings)
Build a mail transport based on Flarum's current settings.