From 53183ae12f49317859458ef84f37921e85049eaa Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Thu, 30 Nov 2023 11:41:50 +0530 Subject: [PATCH] docs: added set region use case --- USE_CASES.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/USE_CASES.md b/USE_CASES.md index 7f3aeea7..f970d2c0 100644 --- a/USE_CASES.md +++ b/USE_CASES.md @@ -10,6 +10,7 @@ This documentation provides examples for specific use cases. Please [open an iss - [Send an Email to Multiple Recipients](#send-an-email-to-multiple-recipients) - [Send Multiple Emails to Multiple Recipients](#send-multiple-emails-to-multiple-recipients) - [Send Multiple Emails with Personalizations](#multiple-email-personalizations) +- [Set Region](#set-region) - [Transactional Templates](#transactional-templates) - [Legacy Templates](#legacy-templates) - [Send an Email With Twilio Email (Pilot)](#send-an-email-with-twilio-email-pilot) @@ -1172,6 +1173,21 @@ try { } ``` + +# Set Region +The SendGrid object can also be used to set the region to "eu", which will send the request to https://api.eu.sendgrid.com/. By default, it is set to https://api.sendgrid.com/, e.g. + +```php +/sendgrid-php.php'; + +$sendgrid = new \SendGrid(getenv('SENDGRID_API_KEY')); +$sendgrid->setDataResidency("eu"); +OR +$sendgrid->setDataResidency("global"); +``` + # Transactional Templates