2017 © Pedro Peláez
 

symfony-bundle mail-extra-bundle

Mail tools for Swift_Mailer.

image

rezzza/mail-extra-bundle

Mail tools for Swift_Mailer.

  • Friday, December 18, 2015
  • by steph_py
  • Repository
  • 2 Watchers
  • 8 Stars
  • 15,517 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

MailExtraBundle

Add transformer to your mail before sending it., (*1)

Transformers already added:, (*2)

html2text

Needs binary html2text Install: brew install html2text, (*3)

This transformer will create a text/plain verion of your HTML message and add it as part., (*4)

PictureEmbed

This transformer will look at picture on your html email and add pictures in embed of mail., (*5)

Add your transformer

Add it to the config.yml, (*6)

rezzza_mail_extra:
    transformers:
        mytransforrmer:
            id:         service_id
            options:    [] # some options

Your service_id should implements TransformerInterface, example:, (*7)

<?php

namespace MyNamespace\Transformer;

use Rezzza\MailExtraBundle\Transformer\AbstractTransformer;
use Rezzza\MailExtraBundle\Transformer\TransformerInterface;

class MyTransfrormer extends AbstractTransformer implements TransformerInterface
{
    /**
     * {@inheritdoc)
     */
    public function transform(\Swift_Mime_Message $message)
    {
        // transform message
    }

    /**
     * {@inheritdoc)
     */
    public function supports(\Swift_Mime_Message $message)
    {
        return true; // if the message is supported by this transformer ?
    }

}

Activate transformers

You can activate by default a transformer by use the default key on config., (*8)

Else, on the mailer, use:, (*9)

<?php
$transformerProcessor = $this->get('rezzza.transformer.processor'); // or replace by direct definition
$transformerProcessor->activate('my_transformer'); // activate
$transformerProcessor->deactivate('my_transformer'); // deactivate

Full configuration reference:

rezzza_mail_extra:
    mailer_class: Rezzza\MailExtraBundle\Mailer\Mailer
    transformers: # list of transformers
        html2text:
            id:         rezzza.transformer.html2text # service identifier
            default:    false # is used by default on each mail
            enabled:    true # can be disabled for tests for example.
            options:    # some options
                binary: /usr/local/bin/html2text
        picture_embed:
            id:         rezzza.transformer.picture_embed

If you have any questions or improvements, create an issue or contact us., (*10)

The Versions

18/12 2015

dev-master

9999999-dev https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools

18/12 2015

v1.0.2

1.0.2.0 https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools

07/12 2013

1.0.1

1.0.1.0 https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools

19/07 2013

v1.0.0

1.0.0.0 https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools

19/07 2013

dev-feature/mailers

dev-feature/mailers https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools

04/09 2012

dev-PictureEmbedTransformer

dev-PictureEmbedTransformer https://github.com/rezzza/MailExtraBundle

Mail tools for Swift_Mailer.

  Sources   Download

MIT

The Requires

 

mail bundle symfony tools