yus-ham/yii2-resend

Yii 2 extension for [Resend](https://resend.com)

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.0 2023-06-18 16:15 UTC

This package is auto-updated.

Last update: 2024-05-18 18:27:20 UTC


README

You need this library? just install it through composer

composer require yus-ham/yii2-resend --prefer-dist -o

Also don't forget to configure

$config['components']['mailer'] = [
    'class' => 'yusham\resend\Mailer',
    'useFileTransport' => false,
    'viewPath' => '@app/mail',
    'transport' => [
        'apiKey' => '<YOUR_API_KEY>'
    ],
];

And you can then send an email as usually

Yii::$app->mailer->compose('contact/html')
     ->setFrom('from@domain.com')
     ->setTo($form->email)
     ->setSubject($form->subject)
     ->send();