I am trying to create programmatically in C# an EML file as a template for user to send some files using outlook. Unfortunately, by specification, the file that should be sent, has no extension in the name, like "A0001".
The file I create looks like this:
X-Sender: [email protected]
X-Receiver: [email protected]
X-Unsent: 1
MIME-Version: 1.0
Sender: [email protected]
From: [email protected]
To: [email protected]
Date: 14 Jul 2023 10:45:44 +0200
Subject: Subj
Content-Type: multipart/mixed;
boundary=--boundary_0_73a496c2-d154-4972-9044-2a98dc3d247e
----boundary_0_73a496c2-d154-4972-9044-2a98dc3d247e
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
RW1haWwgdGV4dA==
----boundary_0_73a496c2-d154-4972-9044-2a98dc3d247e
Content-Type: application/octet-stream; name="A0001"
Content-Disposition: attachment; filename="A0001"
Content-Transfer-Encoding: base64
ChQeKDI8RlBaZA==
----boundary_0_73a496c2-d154-4972-9044-2a98dc3d247e--
You can see, the attachment is named as "A0001". But, if I open the file in outlook it looks differently:
If I add the file extension, than it works as expected, with choosen extension. If I add a dot to the end like "A0001." it is also being shown with a dot without "dat". Unfortunately, I need to have the file with no extension and with no dots there. By the way, if I remove the attachment in outlook and then attach it again manually by drag&drop, it looks great: no extension.
Is there any way to convince the Outlook not to add the ".dat" extension while opening the eml-file?
Thank you in advance!
