0 votes
by (370 points)

I am trying to save and open an .eml file in Apple Mail as unsent.

I have added the header: Headers.Add("X-Unsent", "1") to the Rebex.Mail.

It opens fine in Outlook (ready to be sent) but when I open the saved .eml file in Apple Mail the email is not ready to be sent. It looks like an email already received. I want to be able to save the .eml file, then open it in Apple Mail and it must be ready to be sent.

Is this possible?
Does the .eml format fully support Apple Mail?
I am trying to use the Rebex library to create emails for an Apple environment.

Thanks

Applies to: Rebex Secure Mail

2 Answers

0 votes
by (147k points)

X-Unsent header is a custom e-mail header that just happens to be supported by a number of e-mail clients. However, it's not a part of the standard, and e-mail clients don't have to support this. If it doesn't make Apple Mail treat the e-mail as "unsent", then apparently it is not recognized by Apple Mail.

Are you able to create an email in Apple Mail, save it as .eml file, open it, and still see it as "unsent"? If you are, it would indicate that Apple Mail uses another custom header to indicate the message state. Opening the saved .eml file in a simple text editor should make it possible to determine which header is that. Then, adding the same header via Rebex Mail should result in equivalent behavior.

by (370 points)
Hi Lukas,

Yes, I am able to open an email in the draft folder from disk. However when I click the file it is not unsent anymore.

For interest sake it seems the header is Uniform-Type-Identifier: com.apple.mail-draft

So, I am unable to open an email in draft form disk in compose mode. This seems to be my problem, and hopefully I can figure out a way around this.
by (15.2k points)
I added  step by step how to send a MIME (.eml) message from Apple Mail application in separate answer: http://forum.rebex.net/9290/save-email-as-unsent-using-eml-in-apple-mail?show=9298#a9298
0 votes
by (15.2k points)

Hello,

The only way we found to send MIME (.eml) files is to import them to Apple Mail application. Here are the steps that make it possible to import, edit and/or send a message saved as .eml file:

  1. Select File -> Import Mailboxes...
  2. Choose Apple Mail and click Continue
  3. Select an .eml file or a directory containing your .eml files which you want to edit and click Choose
  4. Complete the import operation.
  5. Now, each .eml file has its own folder in a newly-created Import mailbox (in My Mac section)
  6. Drag and drop a message from inside its folder to Drafts folder.
  7. In the Drafts folder you can now edit the imported message and/or send it.

No special header in the original .eml message is needed for this process. We have not found any easier (or another) way to achieve the same result.

by
Thanks, that's what I was looking for <3
...