Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-adamski/symfony-mailer-bundle
Bundle for Symfony which helps compose and send emails
https://github.com/m-adamski/symfony-mailer-bundle
mailer-bundle php symfony symfony-bundle
Last synced: 26 days ago
JSON representation
Bundle for Symfony which helps compose and send emails
- Host: GitHub
- URL: https://github.com/m-adamski/symfony-mailer-bundle
- Owner: m-adamski
- License: mit
- Created: 2018-10-24T06:25:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T07:21:55.000Z (almost 5 years ago)
- Last Synced: 2024-04-19T23:02:37.543Z (7 months ago)
- Topics: mailer-bundle, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mailer Bundle for Symfony
The package unifies the class nomenclature and adds new functionality to the existing SwiftMailer library.
Using it, creating messages is more convenient and faster.This bundle is compatible with Symfony 4.1 and Symfony 5.0. Symfony 3.4 compatibility abandoned.
## Installation
This bundle can be installed by Composer:
```
$ composer require m-adamski/symfony-mailer-bundle
```## How to use it?
The helper contains an additional function to create a message instance.
With its help, you can also render the message content from the Twig template.| Method | Description |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| buildMessage | The function returns a message instance. It is possible to overwrite the class parameters later. |
| renderTemplate | The function renders the message content from the given Twig template. |
| sendMessage | The function sends a previously prepared message. The return value is the number of recipients to whom the message was sent. |To simplify the creation of HTML messages, a function has been prepared in the ``MailerMessage`` class that automatically defines the message as ``text/html``.
| Method | Description |
| ----------- | ----------------------------------------------------------------- |
| setHTMLBody | The function sets the class parameters to get a text/html message |## License
MIT