2017 © Pedro Peláez
 

yii2-extension yii2-slack-mailer

image

alexeevdv/yii2-slack-mailer

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 126 % Grown

The README.md

yii2-slack-mailer

Build Status codecov PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2, (*1)

Yii2 mailer implementation that send mails to specified webhook., (*2)

Preview, (*3)

Installation

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

Either run, (*5)

$ php composer.phar require alexeevdv/yii2-slack-mailer "~2.0"

or add, (*6)

"alexeevdv/yii2-slack-mailer": "~2.0"

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

Configuration

Through application component

use alexeevdv\yii\SlackMailer;

//...
'components' => [
    //...
    'mailer' => [
        'class' => SlackMailer::class,
        'webhook' => 'https://your_webhook_link',
    ],
    //...
],
//...

Available params

  • webhook, (*8)

    • description: Your webhook URL
    • required: true
    • type: string
  • icon, (*9)

    • description: :emoji: or URL to image
    • required: false
    • type: string
  • channel, (*10)

    • description: Channel name
    • required: false
    • type: string
  • username, (*11)

    • description: Bot name
    • required: false
    • type: string
  • link_names, (*12)

    • required: false
    • type: boolean
    • default: false
  • unfurl_links, (*13)

    • required: false
    • type: boolean
    • default: true
  • unfurl_media, (*14)

    • required: false
    • type: boolean
    • default: true
  • allow_markdown, (*15)

    • required: false
    • type: boolean
    • default: true

The Versions