PHP
Introduction
PHP
Introduction
Learn how to send your first email using the Resend PHP SDK.
Prerequisites
To get the most out of this guide, you will need to:
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
$resend = Resend::client('re_123456789');
$resend->emails->send([
'from' => 'from@example.com',
'to' => 'to@example.com',
'subject' => 'hello world',
'html' => '<strong>it works!</strong>',
]);
3. Try it yourself
PHP Example
See the full source code.