NEW Outlook: opening EML file with "X-Unsent: 1" removes body and attachment

Patrick Simons2 10 Reputation points
2025-03-31T13:41:40.3+00:00

Hi,

I'm migrating a PIA (interop) program from classic Outlook to NEW Outlook.
Current version of NEW Outlook:

  • Microsoft Outlook Version: 1.2025.319.100 (Production)
  • Client Version: 20250320055.21

Tests were made on Windows 11.

As NEW Outlook no longer supports COM, I save the mail properties into an EML file and open it using Pro cess.Start() (using VB.Net in Visual Studio 2022). The mail contains a subject, a body and an attachment. As the eml file also contains "X-Unsent: 1", NEW Outlook opens the mail in "new mail" mode (draft).

Tests:

  • Body in plain text with X-Unsent --> body text and attachment are missing in mail
  • Body in plain text without X-Unsent --> body text and attachment present, but mail not displayed as draft
  • Body in HTML with X-Unsent --> body text present and attachment are missing in mail
  • Body in HTML without X-Unsent --> body text and attachment present, but mail not displayed as draft

Any ideas? A bug in NEW outlook?

The same tests work correctly with classic Outlook.

@Microsoft: BTW. when I write "Pro cess.Start()" together without a space, I can't save this post. I get the message "You are not authorized to make this response. If you believe this to be in error, please refresh the page and try again."

Regards,
Patrick

Microsoft 365 and Office | Development | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Russo 16 Reputation points
    2025-04-08T15:23:23.4866667+00:00

    Hi, I'm in the same boat as you with having to support applications that email out of Outlook, but I haven't been able to reproduce this problem. I'm also following along at

    https://gist.github.com/SelimBasyouni/efec48a197bfefb59d4ff75797aae15e

    My Outlook new is:

    Microsoft Outlook Version: 1.2025.328.300 (Production)

    Client Version: 20250328005.20

    WebView2 Version: 134.0.3124.93 (Stable)

    Session ID: b3025730-6eaf-dc4e-b651-21d5444fae01

    I have opened up multiple copies of a sample.eml quoted below and I can't get it to remove the attachments, i've added and changed attachments many times to different EML files with no problem. Any modifications I make to it wind up saving it as a Draft in my Drafts folder, and no changes are made to the .eml file itself unless I do a Save As to overwrite it or create a new EML file.

    That said, I have not yet added any code to programatically create EML files. I have only tested with the sample below, so maybe there is something about the way the file is being generated below that differs from this file, which I got somewhere on the Internet from some Thunderbird example EML file source.

    X-Unsent: 1
    X-Identity-Key: id1
    X-Account-Key: account1
    From: "******@papersolve.com" <******@papersolve.com>
    Subject: test confirmation
    To: ******@papersolve.com
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101
     Thunderbird/69.0
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
     boundary="------------26A45336F6C6196BD8BBA2A2"
    Content-Language: en-US
    This is a multi-part message in MIME format.
    --------------26A45336F6C6196BD8BBA2A2
    Content-Type: text/plain; charset=utf-8; format=flowed
    Content-Transfer-Encoding: 7bit
    testtest
    testtest
    testtest
    testtest
    testtest
    testtest
    --------------26A45336F6C6196BD8BBA2A2
    Content-Type: text/plain; charset=UTF-8;
     name="sha1hash.txt"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
     filename="sha1hash.txt"
    NzRjOGYwOWRmYTMwZWFjY2ZiMzkyYjEzMjMxNGZjNmI5NzhmMzI1YSAqZmxleC1jb25maXJt
    LW1haWwuMS4xMC4wLnhwaQpjY2VlNGI0YWE0N2Y1MTNhYmNlMzQyY2UxZTJlYzJmZDk2MDBl
    MzFiICpmbGV4LWNvbmZpcm0tbWFpbC4xLjExLjAueHBpCjA3MWU5ZTM3OGFkMDE3OWJmYWRi
    MWJkYzY1MGE0OTQ1NGQyMDRhODMgKmZsZXgtY29uZmlybS1tYWlsLjEuMTIuMC54cGkKOWQ3
    YWExNTM0MThlYThmYmM4YmU3YmE2ZjU0Y2U4YTFjYjdlZTQ2OCAqZmxleC1jb25maXJtLW1h
    aWwuMS45LjkueHBpCjgxNjg1NjNjYjI3NmVhNGY5YTJiNjMwYjlhMjA3ZDkwZmIxMTg1NmUg
    KmZsZXgtY29uZmlybS1tYWlsLnhwaQo=
    --------------26A45336F6C6196BD8BBA2A2
    Content-Type: application/json;
     name="manifest.json"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
     filename="manifest.json"
    ewogICJtYW5pZmVzdF92ZXJzaW9uIjogMiwKICAiYXBwbGljYXRpb25zIjogewogICAgImdl
    Y2tvIjogewogICAgICAiaWQiOiAiZmxleGlibGUtY29uZmlybS1tYWlsQGNsZWFyLWNvZGUu
    Y29tIiwKICAgICAgInN0cmljdF9taW5fdmVyc2lvbiI6ICI2OC4wIgogICAgfQogIH0sCiAg
    Im5hbWUiOiAiRmxleCBDb25maXJtIE1haWwiLAogICJkZXNjcmlwdGlvbiI6ICJDb25maXJt
    IG1haWxhZGRyZXNzIGFuZCBhdHRhY2htZW50cyBiYXNlZCBvbiBmbGV4aWJsZSBydWxlcy4i
    LAogICJ2ZXJzaW9uIjogIjIuMCIsCgogICJsZWdhY3kiOiB7CiAgICAidHlwZSI6ICJ4dWwi
    LAogICAgIm9wdGlvbnMiOiB7CiAgICAgICJwYWdlIjogImNocm9tZTovL2NvbmZpcm0tbWFp
    bC9jb250ZW50L3NldHRpbmcueHVsIiwKICAgICAgIm9wZW5faW5fdGFiIjogdHJ1ZQogICAg
    fQogIH0KfQ==
    --------------26A45336F6C6196BD8BBA2A2--
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.