---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/sendgrid/for-developers/sending-email/v3-php-code-example#article
headline: v3 API PHP Code Example
description: View code examples showing how to easily send email with PHP using cURL and Twilio SendGrid. Further explore Twilio SendGrid's email sending PHP library.
url: https://www.twilio.com/docs/sendgrid/for-developers/sending-email/v3-php-code-example
inLanguage: en
dateModified: 2024-11-08T19:20:05.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# v3 API PHP Code Example

> \[!NOTE]
>
> We recommend using Twilio SendGrid PHP, our client library, [available on GitHub](https://github.com/sendgrid/sendgrid-php), with full documentation.

> \[!NOTE]
>
> Do you have an [API Key](https://app.sendgrid.com/settings/api_keys) yet? If not, go get one. You're going to need it to integrate!
>
> Make sure you've set the [SENDGRID\_API\_KEY](https://github.com/sendgrid/sendgrid-php#setup-environment-variables) environment variable in your env file.

## Using Twilio SendGrid's PHP Library

Please see the [Twilio SendGrid PHP example code at GitHub](https://github.com/sendgrid/sendgrid-php/blob/main/USE_CASES.md#send-an-email-to-a-single-recipient).
