yus-ham / yii2-resend
Yii 2 extension for [Resend](https://resend.com)
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >8.0
- resend/resend-php: *
- yiisoft/yii2: ~2.0
This package is auto-updated.
Last update: 2025-03-18 20:21:29 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();