GithubHelp home page GithubHelp logo

resend / resend-laravel Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 4.0 76 KB

Resend's Official Laravel SDK

Home Page: https://resend.com/docs/send-with-laravel

License: MIT License

PHP 100.00%
laravel php resend

resend-laravel's People

Contributors

emersonlaurentino avatar jayanratna avatar renovate[bot] avatar zenorocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

resend-laravel's Issues

Older Laravel versions

Hi Guys ๐Ÿ‘‹๐Ÿพ ,
Is there any chance of getting resend to work with older Laravel versions, 8, for example?

This is what I get for installing on a Laravel ^8.0:

~ composer require resend/resend-laravel
./composer.json has been updated
Running composer update resend/resend-laravel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - resend/resend-laravel[dev-main, v0.1.0, ..., v0.5.0, 1.x-dev] require illuminate/support ^9.21|^10.0 -> found illuminate/support[v9.21.0, ..., 9.x-dev, v10.0.0, ..., 10.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires resend/resend-laravel * -> satisfiable by resend/resend-laravel[dev-main, v0.1.0, ..., v0.5.0, 1.x-dev].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require resend/resend-laravel:*" to figure out if any version is installable, or "composer require resend/resend-laravel:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Add documentation for webhooks

The Resend documentation requires additional docs on how to use the webhook feature built into Resend for Laravel.

Currently the webhook route is configured to be: /resend/webhook which dispatches Laravel events based on the webhook event received from Resend.

Add documentation

Documentation is required on how to configure the resend mail transport for a Laravel application.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

composer
composer.json
  • php ^8.1
  • illuminate/http ^10.0|^11.0
  • illuminate/support ^10.0|^11.0
  • resend/resend-php ^0.12.0
  • symfony/mailer ^6.2|^7.0
  • friendsofphp/php-cs-fixer ^3.14
  • mockery/mockery ^1.5
  • orchestra/testbench ^8.17|^9.0
  • pestphp/pest ^2.0
github-actions
.github/workflows/tests.yml
  • actions/checkout v4
  • shivammathur/setup-php v2
  • actions/cache v4
  • ubuntu 22.04

  • Check this box to trigger a request for Renovate to run again on this repository

Typo in the official docs

Hi!
I recently integrated Resend into my PaaS and it works like a charm - thanks for such an accessible DX.
I noticed just one thing because it gave me a little bit of an headache - in the official docs for laravel under this url: https://resend.com/docs/send-with-laravel in the "Using the Resend Facade" section there's a typo in the class' method.
Resend::emails() is the correct syntax and on the website we can see a Resend::email() which results in a laravel error.
I dont know if its the right place to report this minor issue - if its not then please let me know so I can go and let the right person know :D

Once again, thanks for such a great laravel integration even if it's a niche

Unable to install

Hi,

I am getting this error.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - resend/resend-laravel[v0.1.0, ..., v0.1.1] require resend/client ^0.1.1 -> could not be found in any version, there may be a typo in the package name.
    - resend/resend-laravel v0.1.2 requires resend/client ^0.2.0 -> could not be found in any version, there may be a typo in the package name.
    - resend/resend-laravel[dev-main, v0.1.3, ..., v0.5.0, 1.x-dev] require symfony/mailer ^6.2 -> found symfony/mailer[v6.2.0-BETA1, ..., 6.4.x-dev] but the package is fixed to v6.0.17 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires resend/resend-laravel * -> satisfiable by resend/resend-laravel[dev-main, v0.1.0, ..., v0.5.0, 1.x-dev].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require resend/resend-laravel:*" to figure out if any version is installable, or "composer require resend/resend-laravel:^2.1" if you know which you need.

Argument #2 ($value) must be of type string, null given

I'm getting this error from time to time:

Symfony\Component\Mime\Header\Headers::addTextHeader(): Argument #2 ($value) must be of type string, null given, called in /vendor/symfony/mime/Header/Headers.php on line 152

This is triggered by vendor/resend/resend-laravel/src/Transport/ResendTransportFactory.php:โ€‰66

Unsupported mail transport [resend].

Not sure what I miss..

Error:
image

mail.php

    'mailers' => [
        'resend' => [
            'transport' => 'resend',
        ],
        'smtp' => [
            'transport' => 'smtp',
            'url' => env('MAIL_URL'),
            'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
            'port' => env('MAIL_PORT', 587),
            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
            'username' => env('MAIL_USERNAME'),
            'password' => env('MAIL_PASSWORD'),
            'timeout' => null,
            'local_domain' => env('MAIL_EHLO_DOMAIN'),
        ],

        'ses' => [
            'transport' => 'ses',
        ],
...

.env:
image

composer:
image

Laravel Integration Error.

I have followed the defined instructions for Laravel-Resend and am seeing this error when attempting to send a raw email .
TYPE ERROR Symfony\Component\Mime\Header\Headers::addTextHeader(): Argument #2 ($value) must be of type string, null given,

File Attachments not sent

Hello Team,

I noticed that email attachments are not being forwarded using the laravel library. I think this is something that the library should address.

Regards,
Runo

Add tests

Important!

Add tests for the package to ensure developers have a stable experience. Local testing isn't enough.

Add support for webhooks

  • Add a POST /resend/webhook route, handled using WebhookController@handle.
  • Add provision for webhook secret verification middleware. (There is currently no Resend feature for this).
  • handle method in controller should transform the event name so it can be handled. Eg. email.sent -> handleEmailSent.
  • Each events handle method should dispatch a Laravel Event: EmailSent/EmailDelivered/EmailDeliveryDelayed/EmailComplained/EmailBounced/EmailOpened/EmailClicked.
  • The developer can then handle the event using a Laravel listener, and the controller will automatically respond with a 200 status to Resend servers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.