Skip to main content

Prerequisites

To get the most out of this guide, you will need to: Prefer watching a video? Check out this video walkthrough below.

1. Install

Get the Resend PHP SDK.
Composer
composer require resend/resend-php

2. Send email using HTML

The easiest way to send an email is by using the html parameter.
index.php
<?php

require __DIR__ . '/vendor/autoload.php';

$resend = Resend::client('re_xxxxxxxxx');

$resend->emails->send([
  'from' => 'Acme <onboarding@resend.dev>',
  'to' => ['delivered@resend.dev'],
  'subject' => 'hello world',
  'html' => '<strong>it works!</strong>',
]);

3. Try it yourself

Basic Send

Basic, batch, and prevent-threading send

Attachments

File attachments and inline images (CID)

Scheduling

Schedule emails for future delivery

Templates

Send emails using Resend hosted templates

Double Opt-in

Double opt-in subscription flow

Inbound Webhooks

Receive and process inbound emails

Audiences

Manage contacts and audiences

Domains

Create and manage sending domains

Symfony App

Full Symfony web application