Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Mail To Lotus Notes - Body Text Appears in one continuous line

Status
Not open for further replies.

TrekFan

Programmer
Apr 23, 2003
25
CR
Hi there,
I'm sending a Mail using lotus notes r5 with visual basic 6.0

This works fine expect for one problem. Text that appears in the body of the mail is one continuous line and i cannot get line breaks/carrige returns in the body text. !!
I capture the body on a web form and send it to a visual basic dll that sends the mail. If I send this :

This
is
a
test

I would get on a notes system the following line
a|b|c|d

but if i send the same email to an outlook system it looks fine !! Any ideas ???


Thanks for your help !!

 
Hi Frederico

Thanks for your reply. Of course here goes the vb routine that does the e-mail sending process. I took out the error handling routines to focus on the routine itself.

Public Sub SendMail(ByVal pFrom As Variant, _
ByVal pTo As Variant, _
ByVal pSubject As Variant, _
ByVal pBody As Variant, _
ByVal pAttachmentFileName As Variant)
' Requires that notes client is installed on the system

Dim lMailDB As NotesDatabase 'the mail database
Dim lMailDoc As NotesDocument 'The mail document itself
Dim lAttachME As NotesRichTextItem 'The attachment richtextfile object
Dim lSession As NotesSession 'Notes session
Dim lEmbedObj As Object 'The embedded object (attachment)
Dim lArrTo

Set lSession = New NotesSession

lSession.Initialize

lArrTo = Split(pTo, ",")

'Open the mail database in notes
Set lMailDB = lSession.URLDatabase

If Not lMailDB.IsOpen Then
lMailDB.openmail
End If

'set up the new mail document
Set lMailDoc = lMailDB.CreateDocument

With lMailDoc
.AppendItemValue "Form", "Memo"
.AppendItemValue "Subject", pSubject
.AppendItemValue "Body", pBody
.AppendItemValue "sendto", pTo
.AppendItemValue "ReplyTo", pFrom
End With

'Set up the embedded object and attachment and attach it
If pAttachmentFileName <> "" Then
Set lAttachME = lMailDoc.CreateRichTextItem("Attachment")
Set lEmbedObj = lAttachME.EmbedObject(1454, "", pAttachmentFileName, "Attachment")
End If

'Send Document
lMailDoc.Send 0, lArrTo

Set lMailDB = Nothing
Set lMailDoc = Nothing
Set lAttachME = Nothing
Set lSession = Nothing
Set lEmbedObj = Nothing


End Sub


It is very strange ... as i mentioned before if u sent the email to outlook it looks fine ...


Thanks for your help,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top