alexeevdv/yii2-slack-mailer

Maintainers

Package info

github.com/alexeevdv/yii2-slack-mailer

Type:yii2-extension

pkg:composer/alexeevdv/yii2-slack-mailer

Statistics

Installs: 970

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

2.0.0 2018-07-16 05:28 UTC

This package is auto-updated.

Last update: 2026-03-01 00:24:35 UTC


README

Build Status codecov PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2

Yii2 mailer implementation that send mails to specified webhook.

Preview

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Configuration

Through application component

use alexeevdv\yii\SlackMailer;

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

Available params

  • webhook

    • description: Your webhook URL
    • required: true
    • type: string
  • icon

    • description: :emoji: or URL to image
    • required: false
    • type: string
  • channel

    • description: Channel name
    • required: false
    • type: string
  • username

    • description: Bot name
    • required: false
    • type: string
  • link_names

    • required: false
    • type: boolean
    • default: false
  • unfurl_links

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

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

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