---
title: "What are the common MIME content types used in email attachments?"  
description: "What are the common MIME content types used in email attachments?"  
author: "ICSM Computer"  
published: 2025-05-30  
updated: 2025-05-30  
canonical: https://www.mindstick.com/interview/34187/what-are-the-common-mime-content-types-used-in-email-attachments  
category: "c#"  
tags: ["c#", "mail"]  
reading_time: 3 minutes  

---

# What are the common MIME content types used in email attachments?

In email attachments, **MIME content types** (also known as *media types*) describe the nature of the file being attached. These help email clients understand how to display or handle the file.

### Common MIME Content Types for Email Attachments

| File Type | MIME Content Type | Description |
| --- | --- | --- |
| **Plain Text** | `text/plain` | Basic text file (e.g., `.txt`) |
| **HTML** | `text/html` | HTML file or body content |
| **PDF** | `application/pdf` | Adobe PDF documents |
| **Word** | `application/msword` | Microsoft Word `.doc` |
| **Word (OpenXML)** | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` | `.docx` |
| **Excel** | `application/vnd.ms-excel` | Microsoft Excel `.xls` |
| **Excel (OpenXML)** | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` | `.xlsx` |
| **Image (JPEG)** | `image/jpeg` | JPEG image |
| **Image (PNG)** | `image/png` | PNG image |
| **Image (GIF)** | `image/gif` | GIF image |
| **ZIP archive** | `application/zip` | Compressed `.zip` file |
| **JSON** | `application/json` | JSON structured data |
| **CSV** | `text/csv` | Comma-separated values |
| **MP3 Audio** | `audio/mpeg` | MPEG audio file |
| **MP4 Video** | `video/mp4` | MP4 video file |

### How to Set MIME Type in C# Attachments

When adding attachments in C#, the MIME type is usually inferred from the file extension. But you can explicitly set it:

```cs
var attachment = new Attachment("report.pdf", "application/pdf");
message.Attachments.Add(attachment);
```

Or if reading from a stream:

```cs
Attachment attachment = new Attachment(stream, "report.csv", "text/csv");
message.Attachments.Add(attachment);
```

## Answers

### Answer by ICSM Computer

In email attachments, **MIME content types** (also known as *media types*) describe the nature of the file being attached. These help email clients understand how to display or handle the file.

### Common MIME Content Types for Email Attachments

| File Type | MIME Content Type | Description |
| --- | --- | --- |
| **Plain Text** | `text/plain` | Basic text file (e.g., `.txt`) |
| **HTML** | `text/html` | HTML file or body content |
| **PDF** | `application/pdf` | Adobe PDF documents |
| **Word** | `application/msword` | Microsoft Word `.doc` |
| **Word (OpenXML)** | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` | `.docx` |
| **Excel** | `application/vnd.ms-excel` | Microsoft Excel `.xls` |
| **Excel (OpenXML)** | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` | `.xlsx` |
| **Image (JPEG)** | `image/jpeg` | JPEG image |
| **Image (PNG)** | `image/png` | PNG image |
| **Image (GIF)** | `image/gif` | GIF image |
| **ZIP archive** | `application/zip` | Compressed `.zip` file |
| **JSON** | `application/json` | JSON structured data |
| **CSV** | `text/csv` | Comma-separated values |
| **MP3 Audio** | `audio/mpeg` | MPEG audio file |
| **MP4 Video** | `video/mp4` | MP4 video file |

### How to Set MIME Type in C# Attachments

When adding attachments in C#, the MIME type is usually inferred from the file extension. But you can explicitly set it:

```cs
var attachment = new Attachment("report.pdf", "application/pdf");
message.Attachments.Add(attachment);
```

Or if reading from a stream:

```cs
Attachment attachment = new Attachment(stream, "report.csv", "text/csv");
message.Attachments.Add(attachment);
```


---

Original Source: https://www.mindstick.com/interview/34187/what-are-the-common-mime-content-types-used-in-email-attachments

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
