When integrating with other services, you need to convert your React template into HTML before sending. Inbound takes care of that for you. You can just directly pass the React template to the SDK.
Import the email template you just built and use the Inbound SDK to send it.
Copy
import { Inbound } from 'inboundemail';import { Email } from './email';const inbound = new Inbound(process.env.INBOUND_API_KEY);await inbound.emails.send({ from: '[email protected]', to: '[email protected]', subject: 'hello world', react: <Email url="https://example.com" />,});
Use the Inbound SDK to reply to an email with the same template you just created.
Copy
import { Inbound } from 'inboundemail';import { Email } from './email';const inbound = new Inbound({ apiKey: process.env.INBOUND_API_KEY});// sending an email via inboundawait inbound.emails.send(email.id,{ from: "React Email <[email protected]>", react: <Email url="https://example.com" />});// replying to an email that was received via inboundawait inbound.emails.reply(email.id,{ from: "React Email <[email protected]>", react: <Email url="https://example.com" />});