import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.update({
id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
openTracking: false,
clickTracking: true,
tls: 'enforced',
});
{
"object": "domain",
"id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
}
Update an existing domain.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.update({
id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
openTracking: false,
clickTracking: true,
tls: 'enforced',
});
{
"object": "domain",
"id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
}
opportunistic: Opportunistic TLS means that it always attempts to make a
secure connection to the receiving mail server. If it can’t establish a
secure connection, it sends the message unencrypted.enforced: Enforced TLS on the other hand, requires that the email
communication must use TLS no matter what. If the receiving server does
not support TLS, the email will not be sent.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.update({
id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
openTracking: false,
clickTracking: true,
tls: 'enforced',
});
{
"object": "domain",
"id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
}
Was this page helpful?