Skip to content

Commit 1b299f4

Browse files
authored
chore: update use-case & license year (#1392)
* chore: update use-case * update LICENSE year
1 parent 2d4d512 commit 1b299f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (C) 2023, Twilio SendGrid, Inc. <help@twilio.com>
3+
Copyright (C) 2024, Twilio SendGrid, Inc. <help@twilio.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

docs/use-cases/data-residency-set-hostname.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,33 @@ Use the `setDataResidency` setter to specify which host to send to:
44

55
Send to EU (data-residency: `https://api.eu.sendgrid.com/`)
66
```js
7+
const client = require('@sendgrid/client');
78
const sgMail = require('@sendgrid/mail');
8-
sgMail.setDataResidency('eu');
9+
client.setDataResidency('eu');
910
const msg = {
1011
to: 'recipient@example.org',
1112
from: 'sender@example.org',
1213
subject: 'Hello world',
1314
text: 'Hello plain world!',
1415
html: '<p>Hello HTML world!</p>',
1516
};
17+
sgMail.setClient(client);
1618
sgMail.send(msg);
1719
```
1820
Send to Global region, this is also the default host, if the setter is not used
1921
(data-residency: `https://api.sendgrid.com/`)
2022
```js
23+
const client = require('@sendgrid/client');
2124
const sgMail = require('@sendgrid/mail');
22-
sgMail.setDataResidency('global');
25+
client.setDataResidency('global');
2326
const msg = {
2427
to: 'recipient@example.org',
2528
from: 'sender@example.org',
2629
subject: 'Hello world',
2730
text: 'Hello plain world!',
2831
html: '<p>Hello HTML world!</p>',
2932
};
33+
sgMail.setClient(client);
3034
sgMail.send(msg);
3135
```
3236

0 commit comments

Comments
 (0)