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
    
  • 相关阅读:
    5 个非常实用的 vs 调试技巧
    神秘的 _DEBUG 宏从何处来?
    调试实战 —— dll 加载失败之 Debug Release 争锋篇
    Python 基础 —— 字符串 方法
    linux shell的一些技巧
    salt 一些state模块函数的使用方法记录
    salt 添加iptables的sls例子
    linux 内置函数 操作
    zabbix 自动发现 自动添加主机
    zabbix 触发器 的表达式函数
  • 原文地址:https://www.cnblogs.com/blackbean/p/2045941.html
Copyright © 2011-2022 走看看