Can Elastic Email module be adjusted to work with Resend?

Created on 23 September 2023, over 1 year ago
Updated 24 September 2023, over 1 year ago

Problem/Motivation

I am using https://resend.com/ as a SMTP provider which works well. They also offer a RESTful service, so you can send an email via them with this command (Authorization code is truncated):

curl -X POST 'https://api.resend.com/emails' \
  -H 'Authorization: Bearer re_Ra[...]UN' \
  -H 'Content-Type: application/json' \
  -d $'{
    "from": "onboarding@resend.dev",
    "to": "info@example.org",
    "subject": "Hello World",
    "html": "<p>Congrats on sending your <strong>first email</strong>!</p>"
  }'

I wonder if it would be possible to adjust the Elastic Mail module to function with Resend, perhaps by changing some values in a custom module?

Perhaps there are now enough REST API email providers to warrant a dedicated https://www.drupal.org/project/rest_mail module, just like there is https://www.drupal.org/project/smtp ?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ressa
  • 🇩🇰Denmark ressa Copenhagen
  • Status changed to Closed: won't fix over 1 year ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I don't think this is possible, Resend and Elastic Email seem to be alternative (i.e. competing) solutions. Both seem to have the same/similar purpose, and they both offer an API over which you can send your emails. And these platforms then care about the delivery of the email.

    What you may be looking for is a new integration module like this one, which instead integrates with the Resend API.

    Perhaps there are now enough REST API email providers to warrant a dedicated https://www.drupal.org/project/rest_mail module, just like there is https://www.drupal.org/project/smtp ?

    Don't think you would use curl or the REST API to talk to the Resend service, instead the integration would be working with their API with their resend-php SDK.

  • 🇩🇰Denmark ressa Copenhagen

    Thanks for a fast answer and for making me aware of Resend PHP.

    I hope someone creates a Drupal module with Resend API integration at some point.

    Have a nice day!

  • 🇩🇰Denmark ressa Copenhagen

    I just realized that you do have to set DNS when using Resend, so updating Issue Summary.

    The selling points for Resend are the same as for Elastic Email, though:

    • Send email via a non-blacklisted service
    • Use REST-style API via the standard HTTPS port 443
    • You can be up and running in a short time, for free
Production build 0.71.5 2024