From 41242ee7a4fdd0a019aa038cc70f2ea7db00a2e9 Mon Sep 17 00:00:00 2001 From: sburman Date: Thu, 11 Jan 2024 12:33:01 +0530 Subject: [PATCH 1/2] chore: update use-case --- docs/use-cases/data-residency-set-hostname.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/use-cases/data-residency-set-hostname.md b/docs/use-cases/data-residency-set-hostname.md index 0fc0927d..ebe26ccc 100644 --- a/docs/use-cases/data-residency-set-hostname.md +++ b/docs/use-cases/data-residency-set-hostname.md @@ -4,8 +4,9 @@ Use the `setDataResidency` setter to specify which host to send to: Send to EU (data-residency: `https://api.eu.sendgrid.com/`) ```js +const client = require('@sendgrid/client'); const sgMail = require('@sendgrid/mail'); -sgMail.setDataResidency('eu'); +client.setDataResidency('eu'); const msg = { to: 'recipient@example.org', from: 'sender@example.org', @@ -13,13 +14,15 @@ const msg = { text: 'Hello plain world!', html: '

Hello HTML world!

', }; +sgMail.setClient(client); sgMail.send(msg); ``` Send to Global region, this is also the default host, if the setter is not used (data-residency: `https://api.sendgrid.com/`) ```js +const client = require('@sendgrid/client'); const sgMail = require('@sendgrid/mail'); -sgMail.setDataResidency('global'); +client.setDataResidency('global'); const msg = { to: 'recipient@example.org', from: 'sender@example.org', @@ -27,6 +30,7 @@ const msg = { text: 'Hello plain world!', html: '

Hello HTML world!

', }; +sgMail.setClient(client); sgMail.send(msg); ``` From f91d883fe9f212cedc0e6224e4d674c6a5a33ce2 Mon Sep 17 00:00:00 2001 From: sburman Date: Thu, 11 Jan 2024 12:37:32 +0530 Subject: [PATCH 2/2] update LICENSE year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 3154774a..d703157e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2023, Twilio SendGrid, Inc. +Copyright (C) 2024, Twilio SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in