Skip to content

Repository files navigation

Resend WordPress Plugin

The easiest way to deliver transactional and marketing emails at scale with WordPress.

WordPress Plugin PHP Version License

Overview

Resend for WordPress ensures your transactional emails reach the inbox every time. This plugin intercepts all WordPress emails and routes them through the Resend API for reliable delivery.

Why Resend?

  • πŸ“¬ Superior deliverability with intelligent infrastructure
  • πŸš€ Easy setup in minutes
  • πŸ“Š Detailed analytics and monitoring
  • πŸ’° Generous free tier to get started
  • πŸ”’ Enterprise security and compliance

Features

  • βœ… Simple setup with automatic activation redirect
  • βœ… One-click email testing
  • βœ… Custom sender name and email configuration
  • βœ… Works with all WordPress email functions
  • βœ… Compatible with contact forms, notification plugins, and more
  • βœ… Secure API key management
  • βœ… Clean, intuitive admin interface
  • βœ… Multisite compatible

Installation

From WordPress.org Plugin Directory

  1. Go to Plugins β†’ Add New
  2. Search for "Resend"
  3. Click Install Now
  4. Click Activate
  5. You'll be redirected to setup

Manual Installation

  1. Download the plugin as a ZIP file
  2. In WordPress admin, go to Plugins β†’ Add New β†’ Upload Plugin
  3. Upload the ZIP file and click Install Now
  4. Click Activate Plugin

Via Composer

composer require resend/resend-wordpress

Then activate in your WordPress admin panel.

Quick Start

  1. Create a Resend Account

  2. Generate an API Key

  3. Connect in WordPress

    • Go to Settings β†’ Resend
    • Paste your API key
    • Configure sender name and email
  4. Send a Test Email

    • Click "Send Test Email"
    • Verify you received it
    • Start sending!

Configuration

API Key Setup

The plugin uses Resend's API to send emails. You'll need:

  1. A Resend account (free tier available)
  2. An API key with sending permissions
  3. A verified sender domain

To create an API key:

  1. Visit your Resend dashboard
  2. Click "Create API Key"
  3. Copy the key (starts with re_)
  4. Paste it in Settings β†’ Resend

Sender Configuration

Configure who emails appear to come from:

  • From Email: The email address emails are sent from
  • From Name: The display name in the From field

Important: The "From Email" must be a verified sender address in your Resend account.

Usage

Once activated, the plugin automatically handles all WordPress emails:

  • User account notifications
  • Password reset emails
  • Plugin notifications
  • Contact form submissions
  • Custom emails from themes/plugins using wp_mail()

Sending Emails in Code

Use WordPress's standard wp_mail() function - the plugin handles the rest:

wp_mail(
    'user@example.com',
    'Email Subject',
    'Email body content'
);

All emails are automatically routed through Resend!

Troubleshooting

"wp_mail already declared" Error

Another plugin or custom code is overriding wp_mail(). The Resend plugin must be the only one handling email sending.

Solution: Disable other mail plugins or check your theme/child-theme for custom mail code.

Emails Not Sending

  1. Verify your API key is correct (starts with re_)
  2. Check that your sender email is verified in Resend
  3. Send a test email from the plugin settings
  4. Check your WordPress error logs
  5. Visit Resend Support

Test Email Not Received

  1. Check your spam/junk folder
  2. Verify the test email address is correct
  3. Ensure your Resend account is on an active plan
  4. Check your firewall/host restrictions

Requirements

  • WordPress: 5.8 or later
  • PHP: 7.2 or later
  • Resend Account: Free or paid plan

Security

  • API keys are stored securely in the WordPress database
  • All requests to Resend use HTTPS
  • Nonces protect admin forms
  • User capability checks on all settings pages
  • All user input is sanitized and validated

Best Practices:

  • Keep WordPress and plugins updated
  • Use strong database passwords
  • Never share your API key
  • Regenerate keys if compromised

Development

Setting Up Locally

git clone https://github.com/resend/resend-wordpress.git
cd resend-wordpress
composer install

Code Standards

The plugin follows WordPress coding standards:

# Run linting
composer run lint

# Auto-fix issues
composer run format

File Structure

resend-wordpress/
β”œβ”€β”€ resend.php                 # Main plugin file
β”œβ”€β”€ class-resend.php           # Core plugin class
β”œβ”€β”€ class-resend-admin.php     # Admin functionality
β”œβ”€β”€ wp-mail.php                # wp_mail() override
β”œβ”€β”€ views/                     # Admin templates
β”œβ”€β”€ public/                    # CSS and JavaScript
β”œβ”€β”€ composer.json              # Dependencies
└── README.md                  # This file

Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

For issues and feature requests, please use GitHub Issues.

Support

License

This plugin is licensed under the GPL-2.0-or-later license. See LICENSE for details.

Credits

Built with ❀️ by Resend and contributors.


Ready to get started? Create your free Resend account

Releases

Used by

Contributors

Languages