The User-Agent email header

Like X-Mailer, names the mail client used to write the message.

Software headerUpdated November 12, 2026
Quick answerLike X-Mailer, names the mail client used to write the message. Can be set to anything.
CategorySoftware
Set byThe sender's mail app
Trust levelLow on its own

Example

User-Agent: Mozilla Thunderbird

How to read it

  • Informational only.

Can you trust it?

Can be set to anything. To check an email you are unsure about, paste its full headers into the email header analyzer, or receive it in a temporary inbox where the Email X-ray checks it for you.

How to view email headers

  • Gmail: open the message, click the three dots, then Show original.
  • Outlook: open the message, then File, Properties, Internet headers (desktop), or the three dots, View, View message details (web).
  • Apple Mail: View, Message, All Headers.
  • Yahoo Mail: the three dots, then View raw message.

Where User-Agent sits in a real message

Every email has a header block at the top, then a blank line, then the body. Your mail app hides most of the header block and shows only a few fields. Here is a short, realistic header block with the User-Agent line highlighted:

Return-Path: <bounce@mail.example.com>
Received: from mail.example.com (mail.example.com [192.0.2.10]) by mx.yourprovider.com
Authentication-Results: mx.yourprovider.com; spf=pass; dkim=pass; dmarc=pass
From: "Example Store" <news@example.com>
User-Agent: Mozilla Thunderbird
Subject: Your order has shipped
Date: Thu, 12 Nov 2026 09:14:03 -0500

Servers add their lines at the top as the message travels, so the newest information is first and the sender's original fields are lower down. When you read a header block, start at the top with the lines your own provider added, then work down.

About software headers

Software headers name the app or service that created the message. They are informational and easy to change, but they can help you spot a message that claims to come from a large company while being sent from a cheap mass-mailing script.

Checking User-Agent on a suspicious email

  1. Do not trust this field on its own. The sender wrote it and can put anything here.
  2. Check the Authentication-Results header added by your provider. If DMARC passed for the domain in From, the domain owner authorized the message.
  3. Look for mismatches: a Reply-To at a different domain, a display name that names a bank while the address is a free webmail account, or a domain that is one letter off.
  4. When in doubt, contact the company through its official website or app, never through links in the email.

Notes for developers

  • Header names are case-insensitive, so User-Agent, user-agent and USER-AGENT are the same field.
  • Long values can be folded across several lines. A line that starts with a space or tab continues the previous header (RFC 5322 section 2.2.3).
  • Non-ASCII text in header values is sent as encoded words such as =?UTF-8?B?...?= (RFC 2047). Decode them before you display or compare values.
  • Some fields may appear more than once. Received, for example, appears once per hop. Decide whether your code needs the first, the last or all of them.
  • Never use this header to make a security decision unless your own server added or verified it.

Other software headers

HeaderWhat it does
X-MailerNames the software that created the message.

A scenario: the bank that uses a bulk-mail script

A message claims to come from a major bank, but X-Mailer names a free mass-mailing script often used by spammers. Banks use enterprise mail platforms with their own consistent headers. The software header is not proof on its own, but combined with failed authentication it confirms the suspicion.

Quick checklist

  • Compare software headers with what the claimed sender normally uses.
  • Do not rely on them alone; they are easy to change.
  • Use them to support conclusions from authentication results.

User-Agent in raw, parsed and displayed form

ViewWhat you see
Raw sourceUser-Agent: Mozilla Thunderbird
Parsed by a mail libraryA field named user-agent with its decoded value
Shown by most mail appsHidden unless you open the full source

Related guides

Related headers

  • X-Mailer: Names the software that created the message.

FAQ

What is the User-Agent header?

Like X-Mailer, names the mail client used to write the message.

Who sets the User-Agent header?

The sender's mail app.

Can the User-Agent header be faked?

Can be set to anything.

Is the User-Agent header required?

No. User-Agent is optional. Many messages do not include it, and its absence is not a problem on its own.

Why is User-Agent missing from my email?

Mail apps hide most headers. Open the full source (Show original in Gmail, View message details in Outlook) to see every header. If User-Agent is still not there, the sending software simply did not add it.

Should I worry about X-Mailer?

No. It is informational. It only matters when it contradicts who the sender claims to be.

Can I remove software headers from my own emails?

Some apps let you; most providers add their own regardless.

Install TempMailify

Add TempMailify to your device for one-tap access, like a regular app.