Skip to main content
getInbox accepts a single input argument with the following TypeScript definition:
TypeScript
type GetInboxOptions = {
  address?: string | undefined;
  delimiter?: string | undefined;
  new?: boolean | undefined;
}
Let’s look more closely at these arguments:
  • address: Pass any email address from your team’s email allowlist. If you don’t pass this option, your team’s default email address is used. Your QA Wolf QA engineer can add additional allowed emails or change the default on the Workflow Settings page (Settings > Workflows tab).
    • You may append any value to this email address after a + sign (”plus addressing”). For example, if you have [email protected] in your allowlist, you can pass [email protected] as the value here.
    • You can also optionally use a named address like Foo Bar <[email protected]> so that your full name appears as the sender.
  • new: Set this to true to get a new unique email address. This is equivalent to including a plus address in your address argument, but you don’t have to worry about generating the unique value yourself.
  • delimiter: If your app does not allow plus addresses for user emails, you can pass in a different delimiter along with the new option and it will be used instead of +.
If you are curious about the implementation of the new option, here is what that looks like in TypeScript:
TypeScript
import { init } from "@paralleldrive/cuid2";

const createEmailSuffix = init({ length: 7 });

let emailAddress = args.address ?? teamDefaultEmailAddress;
if (args.new) {
  const [inbox, domain] = emailAddress.split("@");
  emailAddress = `${inbox}${args.delimiter ?? "+"}${createEmailSuffix()}@${domain}`;
}
Here are a few examples of using getInbox to get an email address in a QA Wolf workflow:
TypeScript
const { emailAddress } = await getInbox();
// emailAddress is your team's default email address

const { emailAddress } = await getInbox({ new: true });
// emailAddress is your team's default email address with a unique plus address
// Example: [email protected]

const { emailAddress } = await getInbox({ new: true, delimiter: "-" });
// emailAddress is your team's default email address with a unique address with custom delimiter
// Example: [email protected]

const { emailAddress } = await getInbox({ address: "[email protected]" });
// emailAddress is the same as the `address` you passed in, which must be in your team's allowlist

const { emailAddress } = await getInbox({ address: "Foo Bar <[email protected]>" });
// emailAddress is the same as the `address` you passed in, which must be in your team's allowlist
In addition to emailAddress, getInbox also returns the following functions, which are bound to emailAddress:
  • sendMessage : Send a message from emailAddress
  • waitForMessage : Wait for one expected message to arrive in the inbox for emailAddress
  • waitForMessages : Wait for a period of time and then return all messages that have arrived in the inbox for emailAddress during that time.
Last modified on February 9, 2026