use resend_rs::{types::EnableForgeOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let options = EnableForgeOptions::new().with_custom_return_path("forge"); let _domain = resend .domains .enable_forge("d91cd9bd-1176-453e-8fc1-35364d380206", options) .await?; Ok(())}
import com.resend.Resend;import com.resend.core.exception.ResendException;import com.resend.services.domains.model.Domain;import com.resend.services.domains.model.EnableForgeOptions;public class Main { public static void main(String[] args) throws ResendException { Resend resend = new Resend("re_xxxxxxxxx"); EnableForgeOptions params = EnableForgeOptions .builder() .customReturnPath("forge").build(); Domain domain = resend.domains().forge() .enable("d91cd9bd-1176-453e-8fc1-35364d380206", params); }}
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.DomainForgeEnableAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), "forge" );Console.WriteLine( "Domain Id={0}", resp.Content.Id );
This endpoint returns the DNS records Forge needs. Add them to your DNS and call
Verify Domain with scope: ["forge"],
then poll Retrieve Domain until each of
these records has the statusverified.
Calling this endpoint again returns the current state.
Sending: a Forge SPF record of type CNAME.
Receiving: when the domain also receives email, Forge moves receiving
too. The Receiving record of type MX gets a new value and the statuspending. Replace your current MX record with it.
A receive-only domain has no sending to move, so Forge moves only its
receiving and ignores custom_return_path.Sending and receiving continue without interruption when activating Forge. A
domain keeps sending through its current records while the Forge record
verifies, and keeps receiving through its current MX record until you replace
it.
Sending domains on a dedicated IP and sending domains with legacy DomainKeys
Identified Mail (DKIM) get a forge_unavailable error.
use resend_rs::{types::EnableForgeOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let options = EnableForgeOptions::new().with_custom_return_path("forge"); let _domain = resend .domains .enable_forge("d91cd9bd-1176-453e-8fc1-35364d380206", options) .await?; Ok(())}
import com.resend.Resend;import com.resend.core.exception.ResendException;import com.resend.services.domains.model.Domain;import com.resend.services.domains.model.EnableForgeOptions;public class Main { public static void main(String[] args) throws ResendException { Resend resend = new Resend("re_xxxxxxxxx"); EnableForgeOptions params = EnableForgeOptions .builder() .customReturnPath("forge").build(); Domain domain = resend.domains().forge() .enable("d91cd9bd-1176-453e-8fc1-35364d380206", params); }}
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.DomainForgeEnableAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), "forge" );Console.WriteLine( "Domain Id={0}", resp.Content.Id );
use resend_rs::{types::EnableForgeOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let options = EnableForgeOptions::new().with_custom_return_path("forge"); let _domain = resend .domains .enable_forge("d91cd9bd-1176-453e-8fc1-35364d380206", options) .await?; Ok(())}
import com.resend.Resend;import com.resend.core.exception.ResendException;import com.resend.services.domains.model.Domain;import com.resend.services.domains.model.EnableForgeOptions;public class Main { public static void main(String[] args) throws ResendException { Resend resend = new Resend("re_xxxxxxxxx"); EnableForgeOptions params = EnableForgeOptions .builder() .customReturnPath("forge").build(); Domain domain = resend.domains().forge() .enable("d91cd9bd-1176-453e-8fc1-35364d380206", params); }}
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.DomainForgeEnableAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), "forge" );Console.WriteLine( "Domain Id={0}", resp.Content.Id );