Ravi Vishwakarma is a dedicated Software Developer with a passion for crafting efficient and innovative solutions. With a keen eye for detail and years of experience, he excels in developing robust software systems that meet client needs. His expertise spans across multiple programming languages and technologies, making him a valuable asset in any software development project.
ICSM Computer
30-May-2025In 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
text/plain.txt)text/htmlapplication/pdfapplication/msword.docapplication/vnd.openxmlformats-officedocument.wordprocessingml.document.docxapplication/vnd.ms-excel.xlsapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet.xlsximage/jpegimage/pngimage/gifapplication/zip.zipfileapplication/jsontext/csvaudio/mpegvideo/mp4How 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:
Or if reading from a stream: