Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Send emails with PHP

Before you start, you'll need:

Prefer watching a video? Check out this video walkthrough below.

YouTube video player
  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>',
    ]);
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu