I have been keeping an eye on the larl framework on GitHub and was excited to see a recent commit by Taylor. They added resend as a way to send email in laravel. I was intrigued because I thought resend was only for Next.js, but now it's integrated with laravel. I decided to do a speedrun of setting up resend with laravel, sending an email, and discussing their pricing.
I started with a default LEL application and navigated to the mail docs. I searched for resend and found the resend driver. I needed to require their PHP package, so I ran the command `composer require resend/php` in my terminal.
Next, I opened the mail.php file in my config directory and scrolled down to look at all of the configurations available to me. I changed the default mailer to resend.
Before switching over to the resend site, I needed to create an API key. I went to the resend site and created an API key called "laravel demo." I then set up the resend key in my .env file.
With resend fully integrated, I moved on to creating a mail message and sending it. I used the command `php artisan make:mail` to create a new mail message. I chose the markdown option so that laravel could translate it into HTML for me.
I then opened the mail.hello file in my resources/views/mail directory and added the markdown code for my email. I wanted to be able to look at the email without sending it, so I returned the mailable straight to the browser.
With the mail message built, I moved on to sending it through resend. I set up the mailer to use resend and passed in the API key. I then sent the mailable to my email address.
Overall, I was impressed with how easy it was to set up and use resend with laravel. The process of getting resend set up took only a few minutes, and building out the email message was straightforward.
Resend offers a generous free tier for both transactional and marketing emails. For transactional emails, you can send 3,000 emails a month for free on one domain. For marketing emails, you can send up to 1,000 contacts a month for free.
I was impressed with the ease of integration and the pricing, and I think resend is a great option for anyone in the market for a new email provider or starting a new project.