Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update use-case & license year #1392

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. <[email protected]>
Copyright (C) 2024, Twilio SendGrid, Inc. <[email protected]>

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: '[email protected]',
from: '[email protected]',
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: '[email protected]',
from: '[email protected]',
subject: 'Hello world',
text: 'Hello plain world!',
html: '<p>Hello HTML world!</p>',
};
sgMail.setClient(client);
sgMail.send(msg);
```

Expand Down
Loading