Capital letters in email addresses don't change delivery, but they matter everywhere else
Email addresses are case-insensitive at the delivery layer. Whether you write John.Smith@example.com, john.smith@example.com, or JOHN.SMITH@EXAMPLE.COM, the mail server treats them as identical and the message arrives at the same inbox. The technical standard (RFC 5321) says the domain part must be case-insensitive, and most mail servers treat the local part — everything before the @ — the same way.
But case matters everywhere else: in email headers that people actually read, in how mail clients display your address, in authentication systems, and in the code you write to handle email. A capital letter in the wrong place can break a script, confuse a filter, or make your message look unprofessional.
Key Takeaways
- Email addresses themselves are case-insensitive at the server level, so john@example.com and JOHN@EXAMPLE.COM reach the same mailbox.
- The From, To, and Subject headers in an email are case-sensitive in how they display to readers and in how mail filters process them.
- SMTP and IMAP commands are case-insensitive, but the data you pass to them (usernames, passwords, folder names) may not be.
- When writing code that handles email, treat addresses as case-insensitive for matching but preserve the original case for display.
- Some mail systems and spam filters treat unusual capitalization as a sign of spoofing or malformed headers, so consistency matters for deliverability.
How mail servers handle case in addresses
The SMTP protocol (straightforward Mail Transfer Protocol) that sends mail treats the domain part of an address as case-insensitive by definition. The local part — the username before the @ — is technically case-sensitive in the standard, but almost every mail server in practice treats it as case-insensitive too. Gmail, Outlook, Yahoo, and most corporate mail systems normalize addresses to lowercase internally.
This means if you send to Jane.Doe@company.com or jane.doe@company.com, both reach Jane's mailbox. The mail server doesn't care. However, some older or custom mail systems may still be case-sensitive on the local part, so if you're integrating with a legacy system, check with the administrator first.
IMAP (the protocol you use to read mail) also treats mailbox names case-insensitively on most systems, though some systems distinguish between INBOX and Inbox. When you're writing a script that logs into IMAP, use the exact case the server expects — usually all caps for INBOX, but test it first.
Why headers and display names are different
The headers of an email — From, To, Subject, Date — are what people see when they open a message. These are text fields, and case matters for readability and filtering. If your From header says JOHN.SMITH@EXAMPLE.COM in all caps, that's what appears in the recipient's inbox. If it says John Smith <john.smith@example.com>, that's what they see.
Mail filters and rules often match against headers using case-sensitive patterns. A filter looking for Subject: Invoice might not catch Subject: INVOICE depending on how the filter was written. If you're setting up automated email processing, test your filter rules with the exact capitalization you expect to receive.
Display names — the human-readable part before the email address — should follow standard capitalization rules. John Smith looks professional; JOHN SMITH or john smith looks either like shouting or careless. Mail clients usually preserve whatever capitalization you set in your account settings.
Case sensitivity in SMTP and IMAP commands
The commands themselves — MAIL FROM, RCPT TO, LOGIN, SELECT — are case-insensitive. You can write mail from, MAIL FROM, or Mail From and the server understands. But the data you pass to those commands may not be.
When you authenticate with IMAP using the LOGIN command, the username and password are case-sensitive. If your account is john.smith@example.com and you type JOHN.SMITH@EXAMPLE.COM, some servers reject it. Test with the exact case your mail provider expects — usually lowercase for Gmail and most modern systems.
Folder names in IMAP can be case-sensitive depending on the server. INBOX is usually safe, but custom folders like Archive and archive might be treated as different folders on some systems. When you write a script to move mail between folders, use the exact case the server returns when you list folders.
What happens when you mix cases in code
If you're writing a script that sends or reads mail, treat email addresses as case-insensitive for comparison but preserve the original case for display. This means: when checking if two addresses match, convert both to lowercase first. When displaying an address to a user or in a header, use the case the user provided or the case the server returned.
A common mistake is storing addresses in all caps and then using them in headers. The mail arrives, but it looks like spam or a system-generated message. Spam filters sometimes flag all-caps headers as suspicious. Keep addresses in mixed case (usually the user's preferred case) for headers and display.
When you're building a mail merge or bulk send, preserve the capitalization in the recipient's address field. If the CSV says Jane.Doe@example.com, use that in the To header, not jane.doe@example.com. It doesn't affect delivery, but it looks intentional rather than automated.
Case and authentication systems
Many mail providers link your email address to your account, and they normalize it to lowercase for internal matching. But the password you set is case-sensitive. MyPassword and mypassword are different. If you're writing a login form or script, make sure you're passing the password exactly as the user typed it — don't convert it to lowercase or any other case.
Some systems also use email addresses as usernames in other contexts — for example, as a login for a web portal or API. In those cases, ask the system administrator whether the username is case-sensitive. If it is, document it clearly so users know to type it the same way every time.
Deliverability and spam filters
Mail systems and spam filters sometimes treat unusual capitalization as a sign of a spoofed or malformed message. An email with a From header in all caps, or with random capitalization in the subject, might be flagged as suspicious. If you're sending automated mail, use standard capitalization: normal case for names and subjects, lowercase for addresses.
Some older mail systems also reject headers that don't follow RFC standards for capitalization. The standard says header names should be capitalized (From, To, Subject), not all caps or all lowercase. If you're building an SMTP client, follow the standard: capitalize the first letter of each word in the header name.
Frequently Asked Questions
Will an email reach me if someone types my address in all caps?
Yes. The mail server treats john@example.com and JOHN@EXAMPLE.COM as the same address, so it reaches your inbox. The From and To headers might display in caps, but the message arrives. However, it may look unusual to you or trigger spam filters, so it's not ideal for regular correspondence.
Does my password need to match the case I set it in?
Yes. Passwords are always case-sensitive. If you set your password as MyPassword123, typing mypassword123 will fail authentication. When you're logging in via SMTP or IMAP, type your password exactly as you created it.
Can I use capital letters in the local part of my email address?
Technically yes, but most mail providers normalize addresses to lowercase. If you sign up with John.Smith@example.com, the system usually stores it as john.smith@example.com internally. For consistency, use lowercase when you give out your address, even if the provider accepts capitals.
What if my mail filter isn't catching emails with different capitalization?
Your filter rule may be case-sensitive. If you wrote a rule for Subject: Invoice, it might not match Subject: INVOICE. Check your mail client's filter settings — most have an option to make matching case-insensitive. If you're writing a script, use a case-insensitive comparison function like toLowerCase() before matching.
Should I use all caps in email headers for emphasis?
No. All-caps text in headers looks like shouting and can trigger spam filters. Use normal capitalization for subject lines and message text. If you need emphasis, use bold or italics in the message body instead.