zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    poj 1088 滑雪
    位运算与bitset
    hdu 4607 Park Visit
    树的直径
    codeforces 495D Sonya and Matrix
    German Collegiate Programming Contest 2015(第三场)
    BAPC 2014 Preliminary(第一场)
    Benelux Algorithm Programming Contest 2014 Final(第二场)
    E. Reachability from the Capital(tarjan+dfs)
    poj2104 K-th Number(划分树)
  • 原文地址:https://www.cnblogs.com/blackbean/p/2045941.html
Copyright © 2011-2022 走看看