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
    
  • 相关阅读:
    JDBC的PreparedStatement是什么?
    Jquery的基本使用方式
    ArrayList,LinkedList,Vector的区别
    数据库连接池的原理。为什么要使用连接池
    .java.util.Date和java.sql.Date有什么区别?
    JDBC的PreparedStatement是什么?
    .Spring Boot 有哪些优点?
    Redis中的常用命令哪些?
    【mybatis-plus】分页、逻辑删除
    MySQL全面瓦解15:视图
  • 原文地址:https://www.cnblogs.com/blackbean/p/2045941.html
Copyright © 2011-2022 走看看