NotesStream when submit a form on web Domino

Dim s As New NotesSession
 Dim db As NotesDatabase
 Dim body As NotesMIMEEntity
 ' NotesStream - new class in Domino6!
 Dim stream As NotesStream
 Set db = s.CurrentDatabase

 s.ConvertMIME = False
 Set stream = s.CreateStream

 ' Configure the mail-doc 
 Dim message As New NotesDocument (db)
 message.Form="memo" 
 Set body = message.CreateMIMEEntity

 ' header-info, add Principal etc
 message.Subject = "This is my subject in the email" 
 message.SendTo = "here goes the e-mail adr"
 message.RecNoOutOfOffice = "1" 

 ' Set HTML 
 Call stream.WriteText ("<html><head><title>Send mail as MIME</title>")

 ' inline stylesheet
 Call stream.WriteText (|
 <style type="text/css">
 <!--
 .text, td, tr, p, br, body {
 COLOR: #000000; 
 FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
 FONT-SIZE: 10px;
 }
 a {
 FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
 COLOR: #333399;
 FONT-WEIGHT: none;
 text-decoration: undeline;
 }
 -->
 </style>
 |)
 ' end inline stylesheet

 Call stream.WriteText ({</head>})
 Call stream.WriteText ({<body text="#666666" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">})
 Dim Title As String 

 ' Start the BODY-part of HTML-document - this is shown in the mail
 Call stream.WriteText ({
 <table width="450" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> 
 <tr>
 <td><b>headline in the mail goes here</b><br><br>
 .. and a lot of text.... 
 </td>
 </tr>
 </table>
 }) 
 ' end BODY part of mail

 ' close HTML-file 
 Call stream.WriteText ({</body></html>})
 Call body.SetContentFromText (stream, "text/html;charset=iso-8859-1", ENC_NONE) 

 ' Send the mail
 Call message.Send (False) 
 s.ConvertMIME = True
原文地址:https://www.cnblogs.com/blackbean/p/2045941.html