How can I send an entire Notes document with attachments and many RT fields via email to Outlook? - lotus-notes

We have an old client application from which users want to be able to send individual documents (many fields, many of them rich text with and without attachments in each) via email to people without Notes clients (or access to Notes). I am able to generate the email and include the attachments, but the body of the email is plain text and the form is very long, so it's line after line of appendText to grab the field data to include in the email. It's ugly! Is there any other way to go about this? Looking for other ideas. Thank you!

Your best bet is probably to write code that creates a new mail message, accesses the document you want to send, and use the NotesDocument.RenderToRTItem method to include the visible contents of that document in the new message.

Related

How to read an email(outlook) without spying in Blue Prism

Blue Prism: I'm trying to read an email(outlook), Which contains the information about the status of a task, name and a table with multiple headers. I should save the required information like name, status of the task in an Excel under the headers which were already written. It should all happen dynamically without spying the elements. Can anybody please elaborate the process?
You've got 2 options:
Use the MAPIEx object for a back-end connection to your Outlook profile's mailbox. (See also: MAPIEx installation guide)
v6.3 and later Use the bundled Blue Prism-provided MS Outlook VBO, which has the following actions:
Delete Email
Forward Email
Get Received Items Advanced
Get Received Items Basic
Get Received Items Expert
Get Sent Items Advanced
Get Sent Items Basic
Get Sent Items Expert
Mark Email As Read
Mark Email As Unread
Move Email to Inbox Sub Folder
Reply to Email
Reply All to Email
Save Attachment Attachments
Save Email
Save Email As File

How to extract the url from an embedded link in an email

I've got an email processing agent. It copies the body of the email into a document's rich text field. If there are any embedded links in the email I want to process that embedded link and extract the url. I started playing around with MIMEEntity but nothing came of it. Any ideas?
thanks
clem
================
Hi Rich,
Well here's a more robust explanation of what's going on. I have several Notes apps which deal with email correspondence. An email comes in, a Notes document is created with some meta data (system generated ID, user's email, name, company, status, etc). The email body is added to a 'correspondence' rich text field of the created Notes doc. The app allows for someone on our side to follow up on the email (ask a question, provide some feedback, etc). That response from us is pre-pended to the original email. If the original sender responds with some further information, THAT email is also pre-pended. To do this pre-pending, I do
bodyText = EmailDoc.GetFirstItem("Body").text
textFromNotesDoc = CTdoc.GetFirstItem("Issue").text
newTextFromNotesDoc = bodyText + <some stuff> + textFromNotesDoc
I then do a replace.
This worked perfectly fine for years. However, recently users have been sending in emails containing embedded links. Of course anything like that is lost when I do the NotesDocument.GetFirstItem().Text. So I've been trying to think of a way to capture the embedded link. The other day it occurred to me that if I could read the html, I could find and extract the url and simply add it to text. I thought maybe using NotesMIMEEntity would allow me to read through the body field and find the url but that's not working.
Clem
The solution is to NOT NotesDocument.GetFirstItem().Text. Just simply take the email coming in and prepend the body field to the discussion RT field. I add tags to the email going out so that I know if the person responding included the previous conversation. That took a little work to figure out but by using NotesRichTextNavigator and related classes, I'm able to deal with that.
clem

How do I send a doclink via LotusScript?

I am iterating through a view of unprocessed requests in LS in a database, and wish to send a reminder with doclink (rather than the doc itself) to the laggards via email. Do I have to manually assemble a rich text item to make a doclink or is there an easier way?
It's pretty easy to create a doclink using Lotusscript.
Set body = New NotesRichTextItem(maildoc,"Body")
Call body.AppendDocLink(doc, "Click me")
And if you want to send an email, use the class in the link below, it even have built-in support for doclinks. :-)
http://blog.texasswede.com/lotusscript-mail-notification-class/
There is the NotesNewsletter class that can help. Essentially it can create a memo containing doclinks to a collection of documents.

How to differentiate between email and chat documents in lotus notes

I'm trying to extract all emails and chat history of a person from his nsf file (lotus notes). I'm using Notes.jar. All the entries in nsf files are documents. Is there a way to identify which document is email and which document is chat. There is an item named "Form" which is used to identify mails (memo), meeting invites (appointment). The problem I face here is both email and chat has form type "Memo".
Kindly suggest me a way to differentiate between email and chat.
You are right: Both kind of documents have form Memo.
Chat- Transcripts in addition have an item $IMTranscript that identifies them.
I found out this fact, using the Icon- Column of the All Documents- view ($All), as Chat- transcripts have different icons in that view. Here is the relevant part of that formula:
#IsAvailable($IMTranscript) & #LowerCase(IMoriginator) = #LowerCase(IMowner);
"ChatTranscriptMe.gif";
#IsAvailable($IMTranscript); "Chat_transcript_icon.gif";

How to store the content of an email (the email & attachments) in one file in SharePoint?

SharePoint is breaking the emails apart separating the attachments from the emails were sent into, resulting in multiple files where should be only one.
Does anyone knows a solution around this issue? How to store an email and its content in one file in SharePoint?
Thanks,
Use the EmailReceived event handler. This is fired when an email is received, leaving you to do the processing.
It passes through an SPEmailMessage which contains the raw message and any attachments. Your event handler would need to extract the mail message and store it as a list item, then copy the attachments over to the Attachments collection of the list item.

Resources