Capitalization does not affect how email works

Email addresses are case-insensitive by design. Whether you write John.Smith@example.com, john.smith@example.com, or JOHN.SMITH@EXAMPLE.COM, they all reach the same inbox. The mail server treats uppercase and lowercase letters as identical in both the local part (before the @) and the domain part (after the @).

This is defined in RFC 5321, the technical standard that governs how email moves between servers. Every mail server you encounter — whether it is Gmail, Outlook, your company's Exchange server, or a custom SMTP setup — must follow this rule. You can type an address however you want, and it will work the same way.

The practical result: if you are setting up SMTP credentials, configuring Git to send commits by email, or storing email addresses in a database, capitalization will never cause a delivery failure. The system normalizes everything to lowercase before routing mail.

Key Takeaways

  • Email addresses work identically regardless of capitalization — uppercase, lowercase, and mixed case all route to the same mailbox.
  • Mail servers normalize addresses to lowercase before processing, so john@example.com and JOHN@EXAMPLE.COM are treated as one address.
  • When storing email addresses in code or databases, you can safely convert them to lowercase for consistency without breaking anything.
  • SMTP and IMAP servers will accept credentials in any capitalization, though storing them in lowercase prevents confusion later.
  • Git and other tools that use email addresses for identification will work correctly regardless of how you capitalize the address.

Why this matters for SMTP and IMAP configuration

When you configure an SMTP server to send mail or an IMAP server to read mail, you enter a username and password. That username is usually an email address. You might type it as developer@company.com or Developer@Company.com — both work, because the server converts it to a standard form before checking it against the account database.

The real issue is not capitalization but consistency in your code. If you store email addresses in mixed case in one place and lowercase in another, you might accidentally create duplicate entries in a database or fail to match an address when you search for it. The solution is to normalize: convert all addresses to lowercase when you store them, then you know every lookup will match.

This is especially important if you are building a system that sends mail through SMTP or reads mail through IMAP. Normalize addresses on input, and you eliminate a whole class of bugs that have nothing to do with email itself.

How to handle email addresses in code

The safest practice is to convert email addresses to lowercase as soon as they enter your system. In most programming languages, this is a single method call: .toLowerCase() in JavaScript, .lower() in Python, .downcase in Ruby.

Store the lowercase version in your database. When a user logs in or you need to match an address, convert their input to lowercase before comparing. This way, a user who types John@Example.Com will match the stored address john@example.com without any special logic.

If you are reading addresses from an external source — a CSV file, an API response, a form submission — normalize them when ready. Do not wait until later. The earlier you standardize, the fewer places in your code have to handle the variation.

Email addresses in Git configuration

Git stores the email address you provide in commit metadata. You set it with git config user.email. The capitalization you use will be preserved in the commit history — if you type Developer@Example.Com, that is what appears in the log.

However, Git does not care about capitalization when matching commits to accounts on a platform like GitHub or GitLab. Those platforms normalize the address before comparing it to your registered email. So a commit attributed to john@example.com will link to your account even if you configured Git with John@Example.Com.

For clarity, set your Git email in lowercase. It makes the commit history consistent and prevents confusion if someone reads the log. Use git config user.email "john@example.com" rather than mixing cases.

What actually breaks email delivery

Capitalization is not a problem. What does break email is a typo in the domain, a missing @ symbol, or a space anywhere in the address. john@exampel.com (note the swapped letters) will fail. john @example.com (space before the @) will fail. john@example.com. (period at the end) will fail.

If mail is not reaching an address, check for these real issues first. Verify the domain is spelled correctly, that there are no extra spaces, and that the @ symbol is present. Capitalization is never the culprit.

Frequently Asked Questions

Will my SMTP server reject credentials if I capitalize the email address differently each time?

No. The SMTP server will accept the credentials regardless of capitalization. However, if you are storing credentials in a config file or environment variable, use lowercase for consistency so you do not accidentally create duplicate entries or confuse yourself later.

Should I store email addresses in my database as lowercase?

Yes. Convert to lowercase on input and store the lowercase version. This prevents duplicate accounts (john@example.com and John@Example.Com being treated as different users) and makes searching and matching much simpler.

Does Git care about capitalization in commit author emails?

Git preserves whatever capitalization you set, but platforms like GitHub and GitLab normalize it before matching commits to accounts. For consistency in your commit history, configure Git with a lowercase email address.

What if I receive mail at an address with uppercase letters in it?

That is not possible. Your mail provider assigned you an address, and it works in any capitalization. You may see it displayed with capitals (like John.Smith@Company.Com), but the actual address is case-insensitive. You can type it however you want.

Can capitalization cause mail to bounce?

No. Mail will never bounce because of capitalization. If a message bounces, the problem is a typo in the domain, a nonexistent account, or a server issue — never capitalization.