Download the PHP package globegroup/mailer-bundle without Composer
On this page you can find all versions of the php package globegroup/mailer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mailer-bundle
GlobeGroup Mailer
Features included:
- Configuration with .env.local for NG and API host,
Installation
- symfony/mailer is required in version 4.4.*
-
Execute command:
-
In
.env.local
use the configuration listed below: - Also remember to configure
MAILER_DSN
from symfony/mailer.
LOCAL TESTING
- Clone repository into
symfony/localVendor
folder. -
Add into composer.json:
- Check if
minimum-stability
is set todev
. - Proceed to Installation.
USAGE
-
Create class
App\Mailer\TestMailer
: -
Create method which will be sending email or emails.
-
$variables
is an array which are passed to Twig email template.Also there are two variables which are passed by default by method
$this->addBasicVariables($variables)
: -
If you need to pass extra configuration variables like url you can use dependency injection:
-
And in
services.yaml
you need to pass values: - Variables
%ngHostWithScheme%
and%apiHostWithScheme%
are configured inside bundle. - When setting array of template variables use method
$this->setVariables([])
; - When passing variables into email template use method
$this->getVariables()
;
License
This bundle is under the MIT license. See the complete LICENSE