PermaLink To save Lotus Notes MIME emails as files...
I occasionally hear people bemoaning the fact that, unlike "proper" email clients (whatever that means), Notes cannot save individual emails as files to the underlying operating system.

Of course, it's not often that you would want to do this, but it can be done, for MIME messages at least...
  • Open any MIME message in the Notes client. (This works for MIME messages you have sent as well as those you have received).
  • Select View / Show / Page Source...
  • Select and copy the entire source to the clipboard.
  • Start Notepad (well, any text editor), and paste the clipboard.
  • Save the file as filename.eml (not filename.txt)

The resulting .eml file will have an email icon on machines with a Microsoft MUA installed and can be opened directly in Microsoft Outlook Express and Netscape Mail. It may also be possible to open it in other MUAs, though I have not tested any.

A variation on this technique works for non-MIME messages too with the loss of attachments and some fidelity in message rendering. Just use a structured text export of the selected message and name the exported file filename.eml.

No doubt you could wrap some code around an action button to automate this. Any takers at OpenNTF?

Category: Notes
Technorati:

Comments :

1. Bruce Elgort17/02/2004 19:06:37
Homepage: http://www.BruceElgort.com


Post as a feature request and we can make it so.




2. Mike Miller17/02/2004 20:57:00


I don't see this as an option in R5.0.12.
My 6.0.2 client lets me right-click and forward the MIME message.




3. Chris Linfoot18/02/2004 08:33:28


Bruce. OK I may do that, although it is not a feature I require - just thought others might find it useful.

Mike, this is an ND6.* feature. R5 has no ability in the client to look at the raw MIME (though it is still there, so a 6 client viewing the same MIME message in the same .nsf can get at it).




4. Richard Schwartz19/02/2004 04:56:36
Homepage: http://smokey.rhs.com/web/blog/rhs.nsf


As far as automation goes, I think I would be more likely to want this as a feature in a folder, to automatically archive all docs in the folder to .eml files, and optionally zip them. Doing them one-off is not too difficult manually. It's only when you want to do a lot that you need automation.

-rich




5. 20/02/2004 16:52:05


Since EML Only works withe Outlook and Netscape, why not just save it as a HTML file?




6. Chris Linfoot20/02/2004 17:22:13


Please identify yourself next time.

Read carefully. I did not say that .eml was only openable in OE and NS, I said those were what I had tried. The file is just raw RFC2822 and so many other mail clients should be able to read it directly though they may use different extensions.

And save as HTML if you want. But it isn't HTML now is it?

Silly Billy.




7. Stuart Bouyer22/04/2004 07:26:36


Not sure if anyone is still reading this, but...

If you save the mime message with a .uu extension and have winzip installed you will get a winzip icon for the message. Double click to open it and all mime parts will be shown in the "zip" package. drag them out to save them.

Depending on the client that sent the mail, the file may get no name, but generally they get the correct name.




8. Chris Linfoot22/04/2004 08:06:51


Yup. Extension .b64 and doubtless others also work. Loads of ways to do this, but .eml is handy because so many systems have Outlook Express installed anyway and you get to see the entire email in its original format.




9. Ben Langhinrichs10/12/2004 16:02:07
Homepage: http://www.GeniiSoft.com/showcase.nsf/GeniiBlog


Another similar option if you have Outlook Express and Internet Explorer is to save it as .mht, which is Microsoft's Web Archive Format. Then it will be viewable in Internet Explorer




10. Chris Linfoot10/12/2004 20:31:34


Didn't know that




11. 14/02/2005 12:30:44


Dear All,

Would any one please tell me how I can ope thousands of Lotus Notes Archived e-mails with Outlook express. I could not open the .nsf files with outlook express. If there is any solution for this issue by probably downloading any kind of freeware softwre to view the .nsf files with Outlook express, please let me know.

Thank you all for your anticipated cooperations in regards to solving my problem.

Regards,

Abdullah Ahmadzai




12. Chris Linfoot14/02/2005 18:35:18


You need a copy of the Notes client software. Once opened in Notes you can use this procedure above to save raw RFC2822 messages source for opening in most other email software.




13. korky07/04/2006 15:12:03


Whenever I reply or forward mail from my inbox, it seems to vanish from my inbox. How do I sort this out?




14. Chris Linfoot07/04/2006 15:42:21


View, Show, unckeck Unread Only.




15. Lutz R.16/08/2006 16:33:34


Hi, nice posting here. Very simple method to create the .eml. Is there nobody who can create a LotusScript to convert many selected messages to eml? A more complicated way but with a script example you can find at http://searchdomino.techtarget.com/tip/0,289483,sid4_gci1190110,00.html
Your help would be great!
Cheers,
Lutz




16. Chris Linfoot16/08/2006 16:47:49


This feature was added to OpenNTF mail per my suggestion. You may find the code you need in that template if you download a copy.

Caveat - every attempt I have seen to enumerate MIME programmatically in Notes/Domino has yielded MIME which is in many respects different to the pure MIME source you see with View / Show / Page Source. Fore example, headers are added or renamed and MIME content is decoded instead of being left alone.

I know of no automatic way of truly handling the pure native MIME in a Notes document.




17. Gwyn Jensen29/01/2007 17:10:20


Is it possible to export a mail document, attachments and all, in a format that can then be read by the lotus notes client and opened again as an email (Similar to the .msg file for Outlook)????




18. Chris Linfoot29/01/2007 17:20:14


There's no way to export a single file containing one email that can be opened and read again in Notes.

You could create a new Notes database using a mailbox template and use copy or cut and paste to place a copy of the message in that. This could even be done programmatically and would be the closest you could get.

Notes does not read RFC2822 formatted MIME messages natively, though if you use the technique documented above to save MIME messages into files, then you can open them in other email software (Outlook Express and Mozilla Thunderbird definitely work - Outlook may work too though I haven't tried it).




19. Gwyn Jensen30/01/2007 10:01:02


Chris,

Thanks for your response.

If Lotus Notes can receive emails in what ever comon format all mail clients receive emails in, is it not possible to export the mail in that format so it can still be read by all mail clients?




20. Chris Linfoot30/01/2007 10:21:41


Yes, but not programmatically. This is a major irritation to me and would not seem to pose a serious problem for IBM to solve but few if any users are asking for it.

The manual method (View, Show, Page Source, select all, copy, paste to Notepad, save as filename.eml) is straightforward enough, but Lotuscript has no access to the complete MIME source and has to recreate it by setting up and executing an iterative loop to retrieve every MIME item associated with the message and writing it out somewhere. The resulting MIME is not a faithful rendition of the original MIME source of the email - not even close.

The opposite of this, importing a MIME formatted message to a Notes mailbox, is also possible but not programmatically, or securely.

You can take the MIME source of any email and hand crank it through Domino SMTP using Telnet for delivery to any local (or, relay restrictions permitting, remote) mailbox. This does result in some small changes to the message source (additional received header, some other headers added or re-ordered), but causes no significant loss of rendering fidelity and will not break an S/MIME signature, if present.




21. Mark20/03/2007 01:12:24


Thanks for the heads up on this chris....I've yet to give it a whirl but could be very useful. We do a fair few migrations from outlook to notes, and when we take outlook away people always complain that they can't save emails and store them on the network drive. Of course shared databases is what's needed but users love the simplicity of saving to a .msg and storing it under their project folders on the network since this is where their filing system is for projects.




22. Mark20/03/2007 01:17:08


meant to mention this too, but I guess most people are already aware. printing email to a pdf printer so it saves the email as a pdf is also very useful. ok you lose the attachment and the ability to forward on the message etc. but it does allow the flexibility of saving corrospondance to the network share for reference




23. dinesh08/05/2007 12:19:31


hi,
i need to save a mail in lotus to my laptop, As i can view it later using lotus7.0
it solud be save as lotus format




24. Prashant 16/07/2007 07:48:20


Hi,
I also need to export a single mail in Lotus Notes that opens in notes just like .eml or .msg opens in outlook.

Any body could help me !!!




25. Abhishek11/12/2007 09:49:35


Hello there,
We are facing some problem in the e-mail notification.
I have set from address in the Jira applcation and when I send mail through it, receive 2 different behaviour for 2 diffrent "From Address" e-mail id.
e-mail ID Notification
abc@at.com (Abhishek)abc@at.com
xyz@at.com xyz@at.com

Please let me know why user name is not appearing the notification mail.




26. Jeff Williams20/12/2007 11:23:23


Hi all, Instead of View, Show, Page Source, select all, copy, paste to Notepad, save as filename.eml)
How about the much simpler File - Export - Save as filename.eml. Is there a difference or am I missing the point :) ? Alternatively, if you export and save as RTF you at least also get an image of the attachment for reference.




27. Chris Linfoot20/12/2007 11:41:09


There is a difference and you are missing the point.

File export does not save the MIME source of the message, only the text. Therefore all message rendering fidelity is lost. This includes:

- in-line images
- fonts and attributes
- attachments
- digital signatures




28. resister12/02/2008 14:45:43


Merci beaucoup!!!




29. Vikas Gupta26/02/2008 04:54:09


I have been googling on this subject for long..and currently I find this is only the best solution for saving notes email to the filesystem.
>> It saves in a format that can be opened by outlook.
>> Preserves the format and also the attachment as it is.

Unfortunately we cannot use it for mails sent from within the organization (maybe since they are non-mime messages).




30. PrashanthSpark16/04/2008 09:41:10


I need to open .eml files in lotus notes . from my sharepoint ...
any one has implemented this . pls let me knw : )




31. Wild Bill16/04/2008 11:14:29
Homepage: http://www.billbuchan.com


I just print em to PDF..

---* Bill




32. Stephan H. Wissel16/04/2008 16:26:41
Homepage: http://www.wissel.net/


Notes does have a single message file format called OND. It is not compatible to any RFC standard but has 100% fidelity. The router uses it when sending messages to other Notes Clients over the Internet. To my current knowledge you need to digg into the C API to get hands on that. Having that as an export option "Save as Note" would be handy. It would only work with Notes clients, but make most users happy!
stw




33. evan17/06/2008 11:55:33
Homepage: http://www.exportnotes.com


You can get the NSF to EML converter software from http://www.exportnotes.com.

Get the Lotus Notes to Outlook Express software http://www.exportnotes.com/outlook-express-emails




34. Nigel T07/07/2008 20:39:06


We have currently encountered a problem where we are seeing p7m attachments for some digitaly sign emails from a list server. The original email was signed not the list server posting. Unfortunately the 'page source' option of view --> show--> page source is greyed out for some reson, hence my question is, is there an alternative solution to viewing the page source? We suspect the issue for the attached p7m is the inclusion of a second boundary value. However, we need to prove this by reviewing the raw message.

Nigel T




35. Chris Linfoot07/07/2008 22:22:39


If view show page source is greyed out, that would imply that the native MIME is missing. There's always Notespeek. Is the field $NotehasnativeMIME set?

If the message was converted to CD by the router prior to delivery then there would be no native MIME and that would probably also cause the SMIME signature to be rendered as an attachment.

What is the user's preference for incoming mail?




36. Lee05/09/2008 16:07:13


Our company has decided to prohibit the ability to archive messages. They also do not save messages older than two weeks and they delete all messages from the server after 60 days.
View/Show/Page Source is greyed out.
File/Export only gives 4 options - ASCII, CGM, RTF & TIFF.
What is the best way to archive all my messages before they hit 60 days (other than to forward them back to me every two months)?




37. Chris Linfoot08/09/2008 14:07:55


I would probably save to PDF (third party software required) and use some folder structure to organise them.

However, while your company's email retention policy seems rather odd, I'm not sure I would want to encourage you to defeat it. Surely it would be better to approach the matter directly and ask those in authority why they have implemented a system which, on the face of things, is not compliant with the requirements of the Sarbanes Oxley Act.




38. Nicholas Dow20/10/2008 02:56:07
Homepage: http://www.cbdweb.net


I wrote a combination of lotusscript, C and Java that did this, mimicking the way that the router does it (notes to notes transfer). To save the email, the Java agent first creates an empty database and copies the mail document in. It also copies in a database-open script. It closes the database and gzips it to the destination file (with extension .ndz). The C program is installed and associated with this extension, and opens the file, unzips it and command-line calls notes with the database. The database-open script opens the document in the client. You get 100% fidelity no matter what the format is, and you can file the email in your mail database, or forward it or reply to it, or extract attachments etc.

We never did deploy this combo, and it didn't get past beta testing but worked well. I wonder if I can still find the source code?




39. Nicholas Dow20/10/2008 03:01:15
Homepage: http://www.cbdweb.net


Sort of related question.

I have a script agent that constructs an email using NotesMimePart techniques. When the email gets to our outbound relay, it has two sets of headers - the ones I created in the script agent, and another set apparently put there by the router.

The email is then rejected as spam for various reasons (too many From headers is a common reason).

Here is some of the information:

Script agent running on server creates a document Form="Memo" and creates a field
Set body = outMemo.CreateMIMEEntity("body")
Headers are created:
Set thishead = body.CreateHeader(hn)
values are set:
Call thishead.SetHeaderValAndParams(hv)
The body gets some content:
Call body.SetContentFromText(stream, "text/html;charset="+EMmimecs, ENC_NONE)
The email is sent:
Call outMemo.send(False)

Viewed in the server's mail.box the headers are OK:
The first "blob" or "body" item is:
Content-Transfer-Encoding: 7bit
To: dontspamme@cbdweb.net
Subject: Quote - Joint Venture
Date: Thu, 2 Oct 2008 11:14:13 +1000
Message-ID: <31c701c9242c$2e691790$1e1ea8c0@ACI.Internal>
From: V@a.com.au
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Thread-Index: AckkLC5kOVVopss2T8GZCoIhNNpz2w==
ReplyTo: V@A.com.au
X-Notes-Item: Memo; name=FORM
Content-Type: multipart/mixed;
boundary="emailSMARTs-z65Bey"

This is a multi-part message in MIME format.

Then we have text/html part, other parts etc.

Once the router gets hold of it and sends the email out to the internet, it looks like this (on our outbound relay server - a@a.com.au is the agent signer's internet address)

Return-Path: <a@a.com.au>
Delivered-To: bad-header-quarantine
X-Envelope-From: <a@a.com.au>
X-Envelope-To: <dontspamme@cbdweb.net>
X-Quarantine-ID: <1vpVaeu-5BNf>
X-Amavis-Alert: BAD HEADER Duplicate header field: "Date"
Received: from mx.a.com.au ([127.0.0.1])
by localhost (mx.a.com.au [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 1vpVaeu-5BNf for <dontspamme@cbdweb.net>;
Thu, 2 Oct 2008 11:29:00 +1000 (EST)
Received: from melbnotes01.ACI.Internal (m.a.internal [192.168.30.31])
by mx.a.com.au (Postfix) with ESMTP id AF8591D8492
for <dontspamme@cbdweb.net>; Thu, 2 Oct 2008 11:28:59 +1000 (EST)
Subject: Quote - Joint Venture
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Thread-Index: AckkLC5kOVVopss2T8GZCoIhNNpz2w==
ReplyTo: V@A.com.au
From: A Mail <a@a.com.au>
To: dontspamme@cbdweb.net
Message-ID: <OF985E9F7D.FA19CEEF-ONCA2574D6.00074AB4-CA2574D6.00074BBF@a.com.au>
Date: Thu, 2 Oct 2008 11:19:41 +1000
X-MIMETrack: Itemize by Agent Manager on melbnotes01/Agricola(Release 7.0.3|September 26, 2007) at
02/10/2008 11:19:41 AM,
Serialize by Router on melbnotes01/Agricola(Release 7.0.3|September 26, 2007) at 02/10/2008 11:29:00 AM
Content-Transfer-Encoding: 7bit
To: dontspamme@cbdweb.net
Subject: Quote - Joint Venture
Date: Thu, 2 Oct 2008 11:14:13 +1000
Message-ID: <31c701c9242c$2e691790$1e1ea8c0@ACI.Internal>
From: V@a.com.au
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Thread-Index: AckkLC5kOVVopss2T8GZCoIhNNpz2w==
ReplyTo: V@A.com.au
X-Notes-Item: Memo; name=FORM
Content-Type: multipart/mixed;
boundary="emailSMARTs-z65Bey"


--emailSMARTs-z65Bey
Content-Type: text/html;charset=iso-8859-1

You can see the headers created by the agent are there, but they are preceded by a different set of headers apparently created by the Router. The mail relay removes most of the duplicate headers which is saving us some pain, but the headers left in are not always the ones put there by the agent.

This appears to be a bug, unless someone can tell me what is being done wrongly.




40. B.Y.07/11/2008 21:18:01


I have emails that contains html content (ie tables, checkboxes, etc) and would like to save them as PDF. Is there a way to programmatically save a Lotus Notes email as a PDF?




Unable to post a comment? Please read this for a possible explanation...
Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.











Search
Popular Categories
Monthly Archive
Other stuff
ClustrMaps
Meta
Proudly powered by IBM Lotus Domino 8 Proudly powered by IBM Lotus Domino 8

Subscribe to articles Subscribe to articles feed

Subscribe to comments Subscribe to comments feed

ROR info ROR info

Like what I do?
Then please consider a donation to support the work of Research Autism.

Idea Jam
Planet Lotus
Contact Me