Menu

Gmail clips a message at 102KB, and our alert email runs out of room between 136 and 208 listings
📰

Gmail clips a message at 102KB, and our alert email runs out of room between 136 and 208 listings

DEV Community: typescript·Daniel Pertu·about 13 hours ago
#1iqZGTUX
#devtotypescript#devto#dev#fafafa#email
Reading 0:00
15s threshold

Notifio watches rental search pages and emails you when a new listing appears. One email can carry listings from several searches at once, grouped by search, because the monitor walks every search in a cycle and the alert goes out at the end of it.

Gmail clips a message once it gets past about 102KB. You get the top of it, a [Message clipped] marker, and a "View entire message" link that opens the rest in a new tab. The figure is not contractual and I have never seen Google promise it, but it has been 102KB for years and it is the only number anyone has.

So: how many listings fit in our alert before Gmail cuts it off? I had never measured. The template is a string, so measuring it is just calling the function.

The document costs 1,656 bytes before any content

buildAlertEmail(alerts, totalCount) takes an array of searches, each with its new listings, and returns one HTML string.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.