I am trying to create a mime e-mail. The problem that I have is that I can not figure out how to grab a rich text field and add it to the mime e-mail. I have searched this forum but found nothing that will help.
Please Help in this…
I am trying to create a mime e-mail. The problem that I have is that I can not figure out how to grab a rich text field and add it to the mime e-mail. I have searched this forum but found nothing that will help.
Please Help in this…
Subject: Mime AND Rich Text Field
Try storing the contents of the Rich Text Field as HTML and MIME via the field properties box. Then check out the GetMimeEntity Method…
(This is from Designer Help)
This agent gets the MIME content from an item.
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim mime As NotesMIMEEntity
Dim m As String
Set db = s.CurrentDatabase
s.ConvertMIME = False ’ Do not convert MIME to rich text|
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
Set mime = doc.GetMIMEEntity
If Not(mime Is Nothing) Then
m = "Content type:" & Chr(9) & _
mime.ContentType & Chr(13) & _
"Content subtype:" & Chr(9) & _
mime.ContentSubType & Chr(13) & _
"Character set:" & Chr(9) & _
mime.Charset & Chr(13) & _
"Encoding:" & Chr(9) & Chr(9) & _
mime.Encoding
Messagebox m,, doc.GetItemValue("Subject")(0)
Messagebox mime.Headers,, "Headers"
Messagebox mime.ContentAsText,, "Content as text"
Else
Messagebox "Not MIME",, doc.GetItemValue("Subject")(0)
End If
Set doc = dc.GetNextDocument(doc)
Wend
s.ConvertMIME = True ’ Restore conversion
End Sub
Subject: RE: Mime AND Rich Text Field
I am trying to get the Body field from the memo form in an e-mail DBI am not able to change the field property
Subject: RE: Mime AND Rich Text Field
Well there are a few ways to do that…
GetFirstItem
CopyItemToDocument
GetItemValue
If you are trying to get the body of a memo, and convert that into MIME to send to a foreign mail system, then you’ll need to work with GetMIMEEntity or the NotesMIMEEntity class after you get the item from the memo document.
Hope this helps. For more detailed help, you need to provide a deeper explanation of whats happening (or not happening) and post your code.
Subject: Mime AND Rich Text Field
Hi Michael, hope this will help…
Dim body As NotesMIMEEntity
Dim stream As NotesStream
s.ConvertMIME = False
Set stream = s.CreateStream
Set maildoc = db.CreateDocument
maildoc.form = "Memo"
Set body = maildoc.CreateMIMEEntity
Call stream.WriteText ("<html>")
Call stream.WriteText ({<body text="#FFF000"
bgcolor="#FFFFFF" leftmargin="0"
topmargin="0" marginheight="0"
marginwidth="0">})
Call stream.WriteText ({
<Font color = Red size = 4px><B><br><br>The text you want to display </B></Font><br>
<br></table>
})
Call stream.WriteText(catch the richtext field and place it here)
Call stream.WriteText ({</body></html>})
Call body.SetContentFromText (stream, "text/html;charset=iso-8859-1", ENC_NONE)
s.ConvertMIME =True
Call maildoc.Send( False )
Subject: RE: Mime AND Rich Text Field
that is the problem, how do I catch the fieldeverything I tried, failed
Subject: RE: Mime AND Rich Text Field
Post the code you are using to try and “catch” the field and tell us what is happening… like are you getting an error or is your RichTextItem returning nothing???
Subject: RE: Mime AND Rich Text Field
when attepting to catch the rich text field will not compile the code. I guess what I am looking for is a way to capture the Rich text field that the mime code will accept