Skip to content

Commit

Permalink
chore: update use-case & license year (#1392)
Browse files Browse the repository at this point in the history
* chore: update use-case

* update LICENSE year
  • Loading branch information
shrutiburman authored Jan 11, 2024
1 parent 2d4d512 commit 1b299f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

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

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
Expand Down
8 changes: 6 additions & 2 deletions docs/use-cases/data-residency-set-hostname.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,33 @@ 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',
subject: 'Hello world',
text: 'Hello plain world!',
html: '<p>Hello HTML world!</p>',
};
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',
subject: 'Hello world',
text: 'Hello plain world!',
html: '<p>Hello HTML world!</p>',
};
sgMail.setClient(client);
sgMail.send(msg);
```

Expand Down

0 comments on commit 1b299f4

Please sign in to comment.