Creating a text email using LotusScript

0 pts.
Tags:
Domino Designer
Web development tools
How do I create a text email to a user who is not using notes as their email program. Situation, we have users that are using outlook and some using notes to receive mail. The problem is that when the application in notes sends out the email, the fields are viewable by users with the notes client but not viewable by users with outlook. I want to send an email that has just text in the body with the field values from notes. Is this possible?
ASKED: May 11, 2005  12:40 PM
UPDATED: May 13, 2005  2:31 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Sure. You need to build the Body field of the memo using the NotesRichTextItem object, and you can use any fields you like as you build it. Here’s an example (the style stuff for formatting is of course optional)…hope it works for you…

Dim session as New NotesSession
Dim newnote As NotesDocument
Dim rtItem As NotesRichTextItem
Dim style As NotesRichTextStyle

Set newnote = New NotesDocument(db )
newnote.Subject = “Subject: ” & doc.YourSubjectField(0)
newnote.SendTo = “whomever@something.com”
newnote.CopyTo = “copyto@something.com”
newnote.Form = “Memo”
Set rtItem = New NotesRichTextItem(newnote , “Body” )
Set style = session.CreateRichTextStyle
style.Bold=True
Call rtitem.AppendStyle(style)
Call rtItem.AppendText(doc.YourFieldInBold(0))
style.Bold=False
Call rtitem.AppendStyle(style)
Call rtItem.AddNewline(2) // add carriage returns
Call rtItem.AppendText(” More text, whatever you want.”)
Call newnote.Send(False)

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Brooklynegg
    That lotuscript richtext item method might work. Check and see. If it doesn't, then you can concatenate field labels and values and carriage returns, then simply assign them to the .body field. Make all the labels all-caps with a colon, then all the data in regular case, or some other method to make it readable. Something like this should work. Desc would have to be dimmed as a string, etc. Desc = "ASSIGNED TO: " & doc.Assigned(0) & Chr$(10) &_ "STATUS: " & doc.Issue_Stat(0) & Chr$(10) &_ "DESCRIPTION: " & doc.Description(0) & Chr$(10) &_ Chr$(10) &_ "COMMENTS/RESOLUTION: " & doc.Resolution(0) newnote.Body = Desc
    3,845 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following