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 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); ```