HEX
Server: Apache
System: Linux 13-202-242-94.cprapid.com 5.14.0-611.16.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 22 03:40:39 EST 2025 x86_64
User: azamsportsacadem (1064)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/azamsportsacadem/public_html/forshellAttachFunction/yii/README.md
# Mailjet Client

## Create Mailjet Account

https://goo.gl/YNWTwd

## Install

```
composer require weluse/yii2-mailjet
```
or add it to your composer.json in the require section
```
"weluse/yii2-mailjet": "*",
```

## Setup
add/replace this in your config under the components key.
```
'components' => [
  'mailer' => [
    'class' => 'weluse\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
  ],
],
```


## Example

```
Yii::$app->mailer->compose('signup', ['user' => $user])
->setTo($user->email)
->setFrom([Yii::$app->params['noReplyMailAddress'] => Yii::$app->name])
->setSubject('Signup success')
->send();
```

## Setup Event Tracking
Write the tracking item to the mailer config.
```
'components' => [
  'mailer' => [
    'class' => 'weluse\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
    'tracking' => [
      'bounce' => 'http://yoururl.com/tracking?event=bounce',
    ],
  ],
],
```
To activate this url you must run this command at one time.
```
Yii::$app->mailer->activateTracking();
```