Download the PHP package everlutionsk/email-bundle-2 without Composer
On this page you can find all versions of the php package everlutionsk/email-bundle-2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download everlutionsk/email-bundle-2
More information about everlutionsk/email-bundle-2
Files in everlutionsk/email-bundle-2
Package email-bundle-2
Short Description Everlution email bundle for Symfony framework
License MIT
Informations about the package email-bundle-2
Email Bundle
This Symfony bundle provides mechanism for sending and receiving email messages through various mail systems.
Installation
Enable the bundle
Configure the bundle
Following configuration snippet describes how to configure the bundle. Configuration requires a names of services, which implements corresponding interfaces. Only exception is doman_name, where you should set something like appdomain.com
mail_system - Name of service, which will be used for sending email messages. This service usually comunicate with SMTP server or with some transactional email platform like Mandrill.
enforced_delivery_address - [Optional] Email address, which will be used to override recipient address in every outbound message.
async_stream - Bundle allows to send email messages asynchronously. Email messages is stored in memory unil some value is added into this Stream. Good example is a Stream of Symfony's kernel.terminate events.
attachment_swappers - After sending or receiving a message, bundle try to save the message's attachments by using this attachment swappers. This swappers can save attachments in various ways.
request_processors - Bundle provide common mechanism to handle inbound messages and outbound message events. This events may occur for example when external mail system try to send scheduled messages. However, different mail systems sending data in different format. Request processors transform this data into format, which is known for this bundle.
Routing
Bundle provides controllers for handling inbound messages and outbound message events.
Basic Usage
Create new outbound message
Get mailer
Synchronous mailer - Mail system is called immediately.
Asynchronous mailer - Mail system is called after adding value into corresponding Stream.
Send / Schedule message
Advanced usage
Message transformers
Every message could be modified before it is forwarded into mail system.
Transforming outbound messages
Register service, which implements OutboundMessageTransformer and add following tag:
Transforming inbound messages
Register service, which implements InboundMessageTransformer and add following tag:
Message templates
Some mail systems supports message templates, which are defined in this systems. The following code shows how to use this templates.
Handle Inbound messages
Inbound messages can be handled by listeners, which listening to events. Events are instances of Inbound message and about its storable version, which has been saved into database.
Caution: If application doesn't need to create associations with inbound message in database, then storable version of message should be ignored.
Mock a mail system
Use service as mail system (see Configure the bundle section).
Supported mail systems
All versions of email-bundle-2 with dependencies
doctrine/orm Version ^2.3
symfony/http-kernel Version ^2.6 || ~3.0 || ~4.0 || >=5.0
symfony/config Version ^2.6 || ~3.0 || ~4.0 || >=5.0
symfony/dependency-injection Version ^2.6 || ~3.0 || ~4.0 || >=5.0