Skip to content

Signing up for Discord? Some of our domains are accepted there. See which ones on the Domains page.

CyberTemp
All posts

How to Test Calendar Invite Emails With a Disposable Inbox

CyberTemp7 min read

Need a disposable inbox right now?

Spin up a temporary email address in seconds — no signup, no spam, no trace.

Get a free inbox

A booking confirmation and a calendar invite are not the same test. The email can send fine — correct subject, correct body, working link — while the attached .ics file has the wrong timezone, a missing METHOD:REQUEST line, or an ORGANIZER field that breaks the RSVP loop in Outlook. None of that shows up if your test suite only checks whether an email arrived.

If you build or maintain anything that sends calendar invites — interview scheduling, webinar registration, appointment booking, meeting reminders — the invite file is the actual product, not the email wrapper around it. Testing it means opening the raw payload, not eyeballing an inbox screenshot.

Why calendar invites break in ways normal emails don't

A password reset email either contains a working link or it doesn't. A calendar invite has to survive being parsed by at least three different calendar clients, each with its own quirks about how it reads the ICS spec. Google Calendar, Outlook, and Apple Calendar don't always agree on ambiguous timezone data, recurring-event rules, or how to handle an invite that arrives after the event's start time.

The bugs that actually reach production tend to be specific:

  • An event created by a user in one timezone shows up an hour off for an attendee in another, usually because the ICS uses a fixed UTC offset instead of a named TZID.

  • The METHOD property is missing or set to PUBLISH instead of REQUEST, so the invite lands as a static event instead of something the recipient can accept or decline.

  • A reminder (VALARM) that should fire 30 minutes before the meeting doesn't fire at all, because the trigger offset was written in the wrong direction.

  • Rescheduling sends a new invite instead of an update, so attendees end up with two calendar entries for one meeting.

None of these are caught by "the email sent successfully." They're caught by opening the raw message and reading the calendar data inside it.

Spin up a throwaway inbox per test run

The pattern is the same one you'd use for OTP or magic-link testing: generate an address per test, trigger the invite, poll for the message, and inspect it. CyberTemp's API handles inbox creation implicitly — the first read against an address creates it, so there's no separate setup call.

import httpx
import time

API_KEY = "tk_..."
HEADERS = {"X-API-Key": API_KEY}
BASE = "https://api.cybertemp.xyz"

def wait_for_message(address, timeout=60, interval=3):
    deadline = time.time() + timeout
    url = f"{BASE}/getMail?email={address}"
    while time.time() < deadline:
        resp = httpx.get(url, headers=HEADERS)
        resp.raise_for_status()
        messages = resp.json()
        if messages:
            return messages[0]
        time.sleep(interval)
    raise TimeoutError(f"no invite arrived for {address}")

address = f"invite-test-{int(time.time())}@cybertemp.xyz"
message = wait_for_message(address)

Give each test run its own address instead of reusing one inbox across a suite. That way a slow or retried test can't read a message left over from the previous run, and you can tear each inbox down at the end of the test without touching anything else in flight.

Reading the ICS payload instead of guessing

Once you have the message body, the calendar data is plain text — a block starting with BEGIN:VCALENDAR and ending with END:VCALENDAR. You don't need a MIME parsing library to sanity-check it; a handful of substring checks catches most real bugs:

body = message.get("body", "")

assert "BEGIN:VCALENDAR" in body, "no calendar data in the invite"
assert "METHOD:REQUEST" in body, "invite isn't a real RSVP request"
assert "DTSTART" in body and "DTEND" in body, "missing start/end time"
assert "ORGANIZER" in body, "missing organizer — RSVP replies have nowhere to go"

For anything beyond a smoke test, pull the block out and parse it properly with an ICS library in your language of choice. But even the flat substring checks above catch the failure mode that matters most: a scheduling change on your backend that silently stops generating a valid invite while the email itself still looks fine in a screenshot.

Timezones and DST are where the real bugs hide

Most calendar invite bugs aren't about the email pipeline at all — they're about the event data underneath it. Test explicitly for the cases that only show up a few weeks a year:

  • An event booked for a date on the other side of a daylight-saving transition. If your backend computes offsets instead of using named TZID values, the invite is correct today and wrong in six weeks.

  • An attendee in a different timezone from the organizer. The invite should render the same instant in both calendars, not the same clock time.

  • A meeting booked close to midnight, where a timezone conversion can push the date to the wrong day entirely.

Each of these is a one-line test once you have a disposable inbox and a way to trigger a booking — generate the address, book across the DST boundary, fetch the invite, check DTSTART against the expected value in UTC. Cheap to write, and it's exactly the kind of bug that otherwise waits for a support ticket in March or November.

Testing the RSVP round trip

A calendar invite isn't done once it's delivered — most booking tools track whether the recipient accepted, declined, or left it tentative. That's a second email in the other direction: the calendar client replies to the ORGANIZER address with an updated PARTSTAT, and your system has to read that reply and update its own state.

Testing this end-to-end means your organizer address also needs to be an inbox you control. Point the booking tool's organizer field at a CyberTemp address, trigger an invite to a second disposable address, and simulate the reply by sending a METHOD:REPLY ICS body back to the organizer inbox. Then poll the organizer address and confirm your system picked up the status change. It's a few extra lines on top of the same polling helper you already wrote for the invite itself.

Wiring this into CI

The pattern only earns its keep if it runs on every change to your scheduling code, not just when someone remembers to test it manually. A few things matter for that:

  • Generate a unique address per test case, not per run — parallel CI jobs will otherwise collide on the same inbox.

  • Delete inboxes at the end of each test rather than letting them pile up against your plan's concurrent-inbox limit.

  • Keep the polling interval reasonable — a tight loop against /getMail wastes requests for no benefit; three-second polling is plenty for a scheduling test.

If your suite runs invite tests across many parallel jobs, the inbox and request limits differ by plan — worth a look at how the plan tiers map to different workloads before you scale a nightly run from a handful of test cases to a full DST-and-timezone matrix. The same request pattern used here is the same one behind OTP test automation and magic-link login testing — one polling helper, reused across every flow that depends on a real inbox.

Bottom line

"The invite email sent" is not the same claim as "the invite is correct." Anything that generates calendar data — booking tools, webinar platforms, interview schedulers, reminder systems — should have a test that opens the actual .ics payload and checks the fields that matter: method, timezone, organizer, and the RSVP reply loop. A disposable inbox per test case makes that cheap enough to run on every change instead of once before a release.

If you're scripting this against a real scheduling flow, the paid tiers are where per-key request limits and concurrent inbox caps stop being the bottleneck once you're running a full timezone matrix in CI. Sign up if that's the shape of what you're building.

Share
    How to Test Calendar Invite Emails With a Disposable Inbox | CyberTemp Blog