---
title: "How Ip2Geo sends usage alerts and billing email with OpenEmail"
description: "Ip2Geo sends 15 kinds of email through the OpenEmail SDK, with idempotency keys, tags and batches of 100. See the code and how it moved from Resend."
url: "https://openemail.uk/integrations/ip2geo"
---

[All integrations](https://openemail.uk/integrations.md)

IP geolocation API

# Ip2Geo sends usage alerts and billingthrough OpenEmail.

Ip2Geo turns IP addresses into location data with one API call. Its 15 kinds of email go through OpenEmail, and most carry an idempotency key built from the event behind them, so a retry never sends a copy.

[Visit ip2geo.dev](https://ip2geo.dev)

libs/openemail/SendBatchEmails.ts

```
const chunkSuffix = `-${chunkNumber}`const chunkLimit = OPENEMAIL_IDEMPOTENCY_KEY_MAX_LENGTH - chunkSuffix.lengthconst chunkKey = idempotencyKey  ? `${idempotencyKey.slice(0, chunkLimit)}${chunkSuffix}`  : undefined const data = await OpenEmail.emails.sendBatch(  rendered,  chunkKey ? { idempotencyKey: chunkKey } : undefined,)
```

Batches go out 100 emails at a time. Each chunk gets its own idempotency key, derived from the event, so a chunk that is retried is never sent twice.

15

kinds of email, each with its own template

12

of them sent with an idempotency key built from the event

Sep 2026

The month it started on OpenEmail

What runs through it

## What Ip2Geo runs on OpenEmail.

- Login codes A one-time code that expires after ten minutes, with at most one new code a minute.
- Usage alerts A warning at 80% and 90% of a plan's lookups, and a notice when the limit is reached.
- Milestones A note to the whole team at 1,000, 10,000, 100,000, 500,000 and one million lookups.
- Team and key activity Invitations, new members, and a heads-up to owners and admins when an API key is created, rotated or deleted.
- Billing Payment receipts with an invoice link, renewals, plan changes, failed payments and cancellations.
- Contact form Messages from the website's contact form, with the visitor set as the reply-to address.

How it was built

## How Ip2Geo put it together.

1. 01
   
   Render every template
   
   Ip2Geo's 15 React Email templates are rendered into HTML and plain text before each send.
2. 02
   
   Tag every email
   
   Each email is tagged with its template, and most with the project it belongs to, so sends can be filtered later.
3. 03
   
   Key every event
   
   Twelve kinds of email carry an idempotency key built from the event, such as the project, the threshold and the billing period.
4. 04
   
   Send in batches of 100
   
   Team-wide email goes out with emails.sendBatch, 100 at a time, and failures come back per recipient.

Features in use

## The OpenEmail features Ip2Geo relies on.

Email API

Send one message or a hundred per call, now or later, and retry without sending twice.

Typed SDKs

TypeScript, Python and Ruby clients, one method for every operation.

/threads?query=invoice

{ "threads": 12 }

Same mailbox, whether a person or a program is holding it.

API keys

A key per job, limited to the scopes and senders it needs, with every call logged.

Multiple domains

Point several domains at one inbox, subdomains included.

acme.com acme.dev team.acme.com hey.acme.io

Questions

## Questions about Ip2Geo and OpenEmail.

More integrations

## Other teams building on OpenEmail.

- [Modulify AI website platform The fastest AI platform for websites and web apps.](https://openemail.uk/integrations/modulify.md)
- [Envless Secrets manager Keeps env variables encrypted, versioned and in sync across every environment.](https://openemail.uk/integrations/envless.md)
- [Uebfaqe AI website builder Builds professional websites for businesses in Albania with AI.](https://openemail.uk/integrations/uebfaqe.md)
- [Wallpapppers Wallpaper gallery Free, reimagined wallpapers that give your screens a fresh look.](https://openemail.uk/integrations/wallpapppers.md)

[All integrations](https://openemail.uk/integrations.md)

## Mint a key. Send something.

Full API, MCP and SDK access on every plan, the free one included.

[Open mail](https://openemail.uk/mail/inbox) [Get Started](https://openemail.uk/signup.md)[Read the API quickstart](https://openemail.uk/docs/api/quickstart.md)
