1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Set s = New NotesSession
Dim docMail As NotesDocument
Dim body As NotesMIMEEntity
Dim stream As NotesStream
Set db = s.CurrentDatabase
s.ConvertMIME = False ' Do not convert MIME to rich text
'Create email to be sent
Set docMail = db.CreateDocument
With docMail
.SendTo = SEND TO ADDRESS
.From = FROM ADDRESS
.Principal = FROM ADDRESS
.ReplyTo = REPLY TO ADDRESS
.Subject = SUBJECT
.Form = "Memo"
End With
Set stream = s.CreateStream
Set body = docMail.CreateMIMEEntity
Call stream.WriteText ("YOUR HTML CODE GOES HERE")
'ENC_IDENTITY_8BIT used because of technote found on notes.net
'http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/aeedaf28e47546ad85256f6a000a4b48?OpenDocument
Call body.SetContentFromText (stream, "text/html;charset=iso-8859-1",ENC_IDENTITY_8BIT)
Call docMail.Send(False)
Set docMail = Nothing
Set body = Nothing
Set stream = Nothing
s.ConvertMIME = True ' Restore conversion |
Partager