NewsCrawler.org

Why is it so expensive to send an email?

A developer who used to work on Gmail's tabbed inbox team at Google set out to learn why companies charge $15 to send 1000 emails, given that sending a message is a plaintext conversation over TCP port 25, much like an HTTPS request. Programming in Haskell with C libraries such as OpenSSL, he implemented the Simple Mail Transfer Protocol (SMTP)[1] himself and sent a test message, which landed in spam. The original version of the protocol needed seven roundtrips per message, no TLS encryption existed at the time, and it lets anyone claim whatever sender they want. He added DNS TXT records[2] with public encryption keys for his domain and signed his mail with OpenSSL functions, after which Gmail delivered his messages to the inbox.

When the database backend for Elm went into private alpha, he tried sending transactional emails[3] with his own Haskell and C code, but the messages reached only Gmail — Microsoft Outlook users did not see them even in spam. Each inbox provider assesses sender reputation differently: some look at the domain, some at the individual IP address, and some at the whole IP address block[4], so spam from any neighbor can get an entire block blacklisted. He hosts with a smaller cloud provider and can get a fixed IP address and treat it well, but if anyone sends spam through the same provider, his whole block may end up blacklisted.

His conclusion is that writing the sending code is a one-time, doable task, but delivering to every inbox requires being trusted by providers with the oldest and goofiest spam filters, which likely means owning an IP address block and sending a high volume of email through it per day. He also speculates that human categorization in Gmail's tabbed inbox — mail sorted into primary, promotions, social, updates, and forums — may give the spam team a better signal on domain names, though he has no inside knowledge.

Read the original evancz.devDiscussion

Discussion

Most commenters agreed the real cost is deliverability rather than sending itself, suggesting the title should really be about not getting mail marked as spam. One disputed the premise that email resembles an HTTPS request, calling email a store-and-forward system that needs a persistent queue and exponential backoff, while another defended SMTP's step-by-step design; others called the situation a racket by large email providers or cited Substack signing people up for mailing lists without consent.

Sources

Published: First seen: Читать по-русски

Open as a page