Download the PHP package dotkernel/dot-controller-plugin-mail without Composer
On this page you can find all versions of the php package dotkernel/dot-controller-plugin-mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dotkernel/dot-controller-plugin-mail
More information about dotkernel/dot-controller-plugin-mail
Files in dotkernel/dot-controller-plugin-mail
Package dot-controller-plugin-mail
Short Description DotKernel mail controller plugin component
License MIT
Informations about the package dot-controller-plugin-mail
[!CAUTION]
Security-Only Maintenance Mode
This package is considered feature-complete, and is now in security-only maintenance mode.
dot-controller-plugin-mail
Mail controller plugin for easy access to dot-mail service from any controller.
Installation
Run the following command in your project's root directory
This will also install packages dotkernel/dot-controller
and 'dotkernel/dot-mail
as dependencies.
Next, make sure you merge the ConfigProvider
to your application's configuration.
Usage
Because multiple mail services can be defined in the dot-mail module, there can also be requested as controller plugins by following the convention
Controller mail plugins are invokable. To send an email you can use the following 2 methods
-
$this->sendMail(array $mailConfig)
- will send a mail through a mail service configured based on the $mailConfig param. The array parameter valid keys are body, subject, to, from, cc, bcc, attachments. The body parameter can be specified as an array too in which case the $body[0] should be the template name to use as mail template and $body[1] should be optionally the template parameters. $this->sendMail($body, $subject, $to, $from, $cc, $bcc, $attachments)
- the parameters have the same meaning as in the previous method
All versions of dot-controller-plugin-mail with dependencies
laminas/laminas-servicemanager Version ^3.21.0
dotkernel/dot-controller Version ^3.4.1
dotkernel/dot-mail Version ^4.1.0