2017 © Pedro Peláez
 

library yii2-archivable-mailer

Yii2 extension for archiving mail HTML content

image

petrabarus/yii2-archivable-mailer

Yii2 extension for archiving mail HTML content

  • Thursday, February 26, 2015
  • by petrabarus
  • Repository
  • 2 Watchers
  • 0 Stars
  • 228 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-archivable-mailer

Yii2 extension for archiving mail HTML content, (*1)

Latest Stable Version Total Downloads Latest Unstable Version, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist petrabarus/yii2-archivable-mailer "*"

or add, (*5)

"petrabarus/yii2-archivable-mailer": "*"

to the require section of your composer.json file., (*6)

Usage

At the moment there is only one provider: AWS S3. Put the behavior in the mailer configuration., (*7)

    'mailer' => [
        /* @var $mailer yii\swiftmailer\Mailer */
        'viewPath' => '@app/mail',
        'useFileTransport' => true,
        'as archivable' => [
            'class' => '\PetraBarus\Yii2\ArchivableMailer\ArchivableBehavior',
            'provider' => [
                'class' => '\PetraBarus\Yii2\ArchivableMailer\Providers\S3Provider',
                'bucket' => 'bucket',
                'directoryPath' => 'email',
                'config' => [
                    'key' => 'AKIAI123456789012345',
                    'secret' => '1234567890123456789012345678901234567890',
                    'region' => 'ap-southeast-1',
                ]
            ]
        ]
    ],

To put the URL of the archive in the HTML, just put {{archiveurl}} in the HTML., (*8)

e.g., (*9)

   <a href="{{archiveurl}}">View in Browser</a>

The text can be changed using archiveUrlTag attribute of the behavior., (*10)

Road Map

  • Add more providers.

The Versions

26/02 2015

dev-master

9999999-dev

Yii2 extension for archiving mail HTML content

  Sources   Download

MIT

The Requires

 

by Petra Barus