atellitech/postal-yii2

It's yii2 component integrating atellitech/postal-php

Maintainers

👁 atellitech

Package info

github.com/AtelliTech/postal-yii2

pkg:composer/atellitech/postal-yii2

Statistics

Installs: 460

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.1 2026-06-01 19:40 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 8e24c063570939deee2c18ef51b8410aa4d0b3b0

  • Eric Huang <eric.huang.woop@atelli.ai>

mailyii2postal

This package is auto-updated.

Last update: 2026-06-01 19:41:35 UTC


README

It's yii2 component integrating atellitech/postal-php and provides LogTarget integration.

Getting Start

Requirements

  • Postal host
  • Postal credential key
  • php8.0+

Install

$ /lib/path/composer require atellitech/postal-yii2

Add component into config file of yii2 project

...
"components": [
 "postal" => [
 'class' => 'AtelliTech\\Yii2\\Postal',
 'host' => $host,
 'key' => $key
 ]
]

Usage

$message = [
 'subject' => 'Hello Test',
 'to' => ['xxx@abc.com',...],
 'from' => 'Test <no-reply@abc.com>',
 'html_body' => '<h3>Hello, Test</h3><p>How are you today?</p>'
];

$result = Yii::$app->postal->send($message);

Log Target Integration

Install

$ /lib/path/composer require atellitech/postal-yii2

Add component into config file of yii2 project

...
"components": [
 "postal" => [
 'class' => 'AtelliTech\\Yii2\\Postal',
 'host' => $host,
 'key' => $key
 ],
 "log" => [
 'targets' => [
 [
 'class' => 'AtelliTech\Yii2\PostalLogTarget',
 'levels' => ['error', 'warning'],
 'postal' => 'postal',
 'subject' => '[Alert] System log', // anything your want
 'from' => 'SysAdmin <sysadmin@abc.com>', // anything your want
 'to' => ['xxxx@abc.com'] // any email addresses
 ],
 ]
 ]
]

Usage

Please refer to Yii2 Logging Document