Skip to content

Commit 3f41a0c

Browse files
Adding MIME type document and links
1 parent c2d98c4 commit 3f41a0c

File tree

5 files changed

+131
-8
lines changed

5 files changed

+131
-8
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Allowed attachment types for sending email
3+
titleSuffix: An Azure Communication Services concept document
4+
description: Learn about how validation for attachment MIME types works for Email Communication Services.
5+
author: natekimball-msft
6+
manager: koagbakp
7+
services: azure-communication-services
8+
ms.author: natekimball
9+
ms.date: 03/24/2023
10+
ms.topic: conceptual
11+
ms.service: azure-communication-services
12+
ms.custom: private_preview, event-tier1-build-2022
13+
---
14+
15+
# Allowed attachment types for sending email in Azure Communication Services Email
16+
17+
The [Send Email operation](../../quickstarts/email/send-email.md) allows the option for the sender to add attachments to an outgoing email. Along with the content itself, the sender must include the file attachment type using the MIME standard when making a request with an attachment. Many common file types are accepted, such as Word documents, Excel spreadsheets, many image and video formats, contacts, and calendar invites.
18+
19+
## What is a MIME type?
20+
21+
MIME (Multipurpose Internet Mail Extensions) types are a way of identifying the type of data that is being sent over the internet. When users send email requests with Azure Communication Services Email, they can specify the MIME type of the email content, which allows the recipient's email client to properly display and interpret the message. If an email message includes an attachment, the MIME type would be set to the appropriate file type (for example, "application/pdf" for a PDF document).
22+
23+
Developers can ensure that the recipient's email client properly formats and interprets the email message by using MIME types, irrespective of the software or platform being used. This information helps to ensure that the email message is delivered correctly and that the recipient can access the content as intended. In addition, using MIME types can also help to improve the security of email communications, as they can be used to indicate whether an email message includes executable content or other potentially harmful elements.
24+
25+
Overall, MIME types are a critical component of email communication, and by using them with Azure Communication Services Email, developers can help ensure that their email messages are delivered correctly and securely.
26+
27+
## Allowed attachment types
28+
29+
Here's a table listing some of the most commonly accepted file extensions and their corresponding MIME types for email attachments:
30+
31+
| File Extension | Description | MIME Type |
32+
| --- | --- | --- |
33+
| .3gp | 3GPP multimedia file | `video/3gpp` |
34+
| .3g2 | 3GPP2 multimedia file | `video/3gpp2` |
35+
| .7z | 7-Zip compressed file | `application/x-7z-compressed` |
36+
| .aac | AAC audio | `audio/aac` |
37+
| .avi | AVI video file | `video/x-msvideo` |
38+
| .bmp | BMP image | `image/bmp` |
39+
| .csv | Comma-separated values | `text/csv` |
40+
| .doc | Microsoft Word document (97-2003) | `application/msword` |
41+
| .docm | Microsoft Word macro-enabled document | `application/vnd.ms-word.document.macroEnabled.12` |
42+
| .docx | Microsoft Word document (2007 or later) | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` |
43+
| .eot | Embedded OpenType font | `application/vnd.ms-fontobject` |
44+
| .epub | EPUB ebook file | `application/epub+zip` |
45+
| .gif | GIF image | `image/gif` |
46+
| .gz | Gzip compressed file | `application/gzip` |
47+
| .ico | Icon file | `image/vnd.microsoft.icon` |
48+
| .ics | iCalendar file | `text/calendar` |
49+
| .jpg, .jpeg | JPEG image | `image/jpeg` |
50+
| .json | JSON data | `application/json` |
51+
| .mid, .midi | MIDI audio file | `audio/midi` |
52+
| .mp3 | MP3 audio file | `audio/mpeg` |
53+
| .mp4 | MP4 video file | `video/mp4` |
54+
| .mpeg | MPEG video file | `video/mpeg` |
55+
| .oga | Ogg audio file | `audio/ogg` |
56+
| .ogv | Ogg video file | `video/ogg` |
57+
| .ogx | Ogg file | `application/ogg` |
58+
| .one | Microsoft OneNote file | `application/onenote` |
59+
| .opus | Opus audio file | `audio/opus` |
60+
| .otf | OpenType font | `font/otf` |
61+
| .pdf | PDF document | `application/pdf` |
62+
| .png | PNG image | `image/png` |
63+
| .ppsm | PowerPoint slideshow (macro-enabled) | `application/vnd.ms-powerpoint.slideshow.macroEnabled.12` |
64+
| .ppsx | PowerPoint slideshow | `application/vnd.openxmlformats-officedocument.presentationml.slideshow` |
65+
| .ppt | PowerPoint presentation (97-2003) | `application/vnd.ms-powerpoint` |
66+
| .pptm | PowerPoint macro-enabled presentation | `application/vnd.ms-powerpoint.presentation.macroEnabled.12` |
67+
| .pptx | PowerPoint presentation (2007 or later) | `application/vnd.openxmlformats-officedocument.presentationml.presentation` |
68+
| .pub | Microsoft Publisher document | `application/vnd.ms-publisher` |
69+
| .rar | RAR compressed file | `application/x-rar-compressed` |
70+
| .rpmsg | Outlook email message | `application/vnd.ms-outlook` |
71+
| .rtf | Rich Text Format document | `application/rtf` |
72+
| .svg | Scalable Vector Graphics image | `image/svg+xml` |
73+
| .tar | Tar archive file | `application/x-tar` |
74+
| .tif, .tiff | Tagged Image File Format | `image/tiff` |
75+
| .ttf | TrueType Font | `font/ttf` |
76+
| .txt | Text Document | `text/plain` |
77+
| .vsd | Microsoft Visio Drawing | `application/vnd.visio` |
78+
| .wav | Waveform Audio File Format | `audio/wav` |
79+
| .weba | WebM Audio File | `audio/webm` |
80+
| .webm | WebM Video File | `video/webm` |
81+
| .webp | WebP Image File | `image/webp` |
82+
| .wma | Windows Media Audio File | `audio/x-ms-wma` |
83+
| .wmv | Windows Media Video File | `video/x-ms-wmv` |
84+
| .woff | Web Open Font Format | `font/woff` |
85+
| .woff2 | Web Open Font Format 2.0 | `font/woff2` |
86+
| .xls | Microsoft Excel Spreadsheet (97-2003) | `application/vnd.ms-excel` |
87+
| .xlsb | Microsoft Excel Binary Spreadsheet | `application/vnd.ms-excel.sheet.binary.macroEnabled.12` |
88+
| .xlsm | Microsoft Excel Macro-Enabled Spreadsheet | `application/vnd.ms-excel.sheet.macroEnabled.12` |
89+
| .xlsx | Microsoft Excel Spreadsheet (OpenXML) | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` |
90+
| .xml | Extensible Markup Language File | `application/xml`, `text/xml` |
91+
| .zip | ZIP Archive | `application/zip` |
92+
93+
There are many other file extensions and MIME types that can be used for email attachments. However, this list includes some of the most commonly accepted types, and should cover most use cases for sending attachments via email. Additionally, it's important to keep in mind that different email clients and servers may have different limitations or restrictions on file size and types. It's always a good idea to check with the recipient or consult the documentation for the recipient email client being used.
94+
95+
## Additional information
96+
97+
The Internet Assigned Numbers Authority (IANA) is a department of the Internet Corporation for Assigned Names and Numbers (ICANN) responsible for the global coordination of various Internet protocols and resources, including the management and registration of MIME types.
98+
99+
The IANA maintains a registry of standardized MIME types, which includes a unique identifier for each MIME type, a short description of its purpose, and the associated file extensions. For the most up-to-date information regarding MIME types, including the definitive list of media types, it's recommended to visit the [IANA Website](https://www.iana.org/assignments/media-types/media-types.xhtml) directly.
100+
101+
## Next steps
102+
103+
* [What is Email Communication Communication Service](./prepare-email-communication-resource.md)
104+
105+
* [Email domains and sender authentication for Azure Communication Services](./email-domain-and-sender-authentication.md)
106+
107+
* [Get started with sending email using Email Communication Service in Azure Communication Service](../../quickstarts/email/send-email.md)
108+
109+
* [Get started by connecting Email Communication Service with a Azure Communication Service resource](../../quickstarts/email/connect-email-communication-resource.md)
110+
111+
The following documents may be interesting to you:
112+
113+
- Familiarize yourself with the [Email client library](../email/sdk-features.md)
114+
- How to send emails with custom verified domains? [Add custom domains](../../quickstarts/email/add-custom-verified-domains.md)
115+
- How to send emails with Azure Managed Domains? [Add Azure Managed domains](../../quickstarts/email/add-azure-managed-domains.md)

articles/communication-services/quickstarts/email/includes/send-email-java.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: natekimball-msft
55
manager: koagbakp
66
services: azure-communication-services
77
ms.author: natekimball
8-
ms.date: 03/03/2023
8+
ms.date: 03/24/2023
99
ms.topic: include
1010
ms.service: azure-communication-services
1111
ms.custom: mode-other
@@ -20,7 +20,7 @@ The following classes and interfaces handle some of the major features of the Az
2020
| Name | Description |
2121
| ---- |-------------|
2222
| EmailAddress | This class contains an email address and an option for a display name. |
23-
| EmailAttachment | This interface creates an email attachment by accepting a unique ID, email attachment type, and a string of content bytes. |
23+
| EmailAttachment | This interface creates an email attachment by accepting a unique ID, email attachment [MIME type](../../../concepts/email/email-attachment-allowed-mime-types.md) string, and a string of content bytes. |
2424
| EmailClient | This class is needed for all email functionality. You instantiate it with your connection string and use it to send email messages. |
2525
| EmailMessage | This class combines the sender, content, and recipients. Custom headers, attachments, and reply-to email addresses can optionally be added, as well. |
2626
| EmailSendResult | This class holds the results of the email send operation. It has an operation ID, operation status and error object (when applicable). |
@@ -262,4 +262,6 @@ PollResponse<EmailSendResult> response = poller.waitForCompletion();
262262
System.out.println("Operation Id: " + response.getValue().getId());
263263
```
264264

265+
For more information on acceptable MIME types for email attachments, see the [allowed MIME types](../../../concepts/email/email-attachment-allowed-mime-types.md) documentation.
266+
265267
You can download the sample app demonstrating this action from [GitHub](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/send-email)

articles/communication-services/quickstarts/email/includes/send-email-js.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: natekimball-msft
55
manager: koagbakp
66
services: azure-communication-services
77
ms.author: natekimball
8-
ms.date: 04/15/2022
8+
ms.date: 03/24/2023
99
ms.topic: include
1010
ms.service: azure-communication-services
1111
ms.custom: mode-other
@@ -20,7 +20,7 @@ The following classes and interfaces handle some of the major features of the Az
2020
| Name | Description |
2121
| ---- |-------------|
2222
| EmailAddress | This class contains an email address and an option for a display name. |
23-
| EmailAttachment | This class creates an email attachment by accepting a unique ID, email attachment mime type string, and binary data for content. |
23+
| EmailAttachment | This class creates an email attachment by accepting a unique ID, email attachment [MIME type](../../../concepts/email/email-attachment-allowed-mime-types.md) string, and binary data for content. |
2424
| EmailClient | This class is needed for all email functionality. You instantiate it with your connection string and use it to send email messages. |
2525
| EmailClientOptions | This class can be added to the EmailClient instantiation to target a specific API version. |
2626
| EmailContent | This class contains the subject and the body of the email message. You have to specify at least one of PlainText or Html content. |
@@ -282,4 +282,6 @@ const message = {
282282
const response = await emailClient.send(message);
283283
```
284284

285+
For more information on acceptable MIME types for email attachments, see the [allowed MIME types](../../../concepts/email/email-attachment-allowed-mime-types.md) documentation.
286+
285287
You can download the sample app demonstrating this action from [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/send-email-advanced/send-email-attachments)

articles/communication-services/quickstarts/email/includes/send-email-net.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: bashan-git
55
manager: sundraman
66
services: azure-communication-services
77
ms.author: bashan
8-
ms.date: 03/06/2023
8+
ms.date: 03/24/2023
99
ms.topic: include
1010
ms.service: azure-communication-services
1111
---
@@ -20,10 +20,10 @@ The following classes and interfaces handle some of the major features of the Az
2020
| Name | Description |
2121
| --------------------| -----------------------------------------------------------------------------------------------------------------------------------------------------|
2222
| EmailAddress | This class contains an email address and an option for a display name. |
23-
| EmailAttachment | This class creates an email attachment by accepting a unique ID, email attachment mime type string, and binary data for content. |
23+
| EmailAttachment | This class creates an email attachment by accepting a unique ID, email attachment [MIME type](../../../concepts/email/email-attachment-allowed-mime-types.md) string, and binary data for content. |
2424
| EmailClient | This class is needed for all email functionality. You instantiate it with your connection string and use it to send email messages. |
2525
| EmailClientOptions | This class can be added to the EmailClient instantiation to target a specific API version. |
26-
| EmailContent | This class contains the subject and the body of the email message. You have to specify atleast one of PlainText or Html content |
26+
| EmailContent | This class contains the subject and the body of the email message. You have to specify at least one of PlainText or Html content |
2727
| EmailCustomHeader | This class allows for the addition of a name and value pair for a custom header. Email importance can also be specified through these headers using the header name 'x-priority' or 'x-msmail-priority' |
2828
| EmailMessage | This class combines the sender, content, and recipients. Custom headers, attachments, and reply-to email addresses can optionally be added, as well. |
2929
| EmailRecipients | This class holds lists of EmailAddress objects for recipients of the email message, including optional lists for CC & BCC recipients. |
@@ -411,6 +411,8 @@ emailMessage.Attachments.Add(emailAttachment);
411411

412412
```
413413

414+
For more information on acceptable MIME types for email attachments, see the [allowed MIME types](../../../concepts/email/email-attachment-allowed-mime-types.md) documentation.
415+
414416
You can download the sample app demonstrating this action from [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/SendEmailAdvanced/SendEmailWithAttachments)
415417

416418

articles/communication-services/quickstarts/email/includes/send-email-python.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: natekimball-msft
55
manager: koagbakp
66
services: azure-communication-services
77
ms.author: natekimball
8-
ms.date: 03/02/2023
8+
ms.date: 03/24/2023
99
ms.topic: include
1010
ms.service: azure-communication-services
1111
ms.custom: mode-other
@@ -346,4 +346,6 @@ message = {
346346
}
347347
```
348348

349+
For more information on acceptable MIME types for email attachments, see the [allowed MIME types](../../../concepts/email/email-attachment-allowed-mime-types.md) documentation.
350+
349351
You can download the sample app demonstrating this action from [GitHub](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/send-email)

0 commit comments

Comments
 (0)