Validate email address in Go

development golang email

Firstly, based on the RFC 3696 Errata 1690, a valid email address has a maximum of 254 characters. Here is the relevant snippet from the RFC: A valid email address has a maximum of 64 characters in the “local part” (before the “@") and a maximum of 255 characters in the domain part (after the “@") for a total length of 320 characters. However, there is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands of 254 characters.

About

Bharghava Varun Ayada is a Staff Software Engineer at Walmart Labs, living in Bangalore, India. This blog is about software engineering, system design, distributed systems and DevOps.


Github / Twitter / LinkedIn / Dev.to / Stackoverflow


Recommended Books
Designing Data-Intensive Applications / Staff Engineer / Building Microservices / Site Reliability Engineering

Get new posts by email