CDONTS.NewMail 的成员(方法、属性…)
来源:互联网 发布:matlab 2015b mac 编辑:程序博客网 时间:2024/04/30 23:03
Sub AttachFile(ByVal Source, [ByVal FileName], [ByVal EncodingMethod])
文件附件
Attaches a file to the mail
Sub AttachURL(ByVal Source, ByVal ContentLocation, [ByVal ContentBase], [ByVal EncodingMethod])
URL 地址附件
Attaches a file or data as a URL
Property Bcc As String
只写
密件抄送
Comma separated list of Bcc recipients
Property Body As Variant
只写
文本或HTML格式的邮件主体
Text or HTML formatted mail body
Property BodyFormat As Long
只写
邮件体格式
Body format
Property Cc As String
只写
抄送
Comma separated list of Cc recipients
Property ContentBase As String
只写
URL附件的根地址
Base URL to the body in mail with URL attachments
Property ContentLocation As String
只写
URL附件的内容地址
URL to the body in mail with URL attachments
Property From As String
只写
来自(回复地址)
From address for mail
Property Importance As Long
只写
紧急程度(低,普通,紧急)
Mail importance, low, normal or high
Property MailFormat As Long
只写
邮件格式
Mail format
Sub Send([ByVal From], [ByVal To], [ByVal Subject], [ByVal Body], [ByVal Importance])
发送
Sends the mail
Sub SetLocaleIDs(ByVal CodePageID As Long)
设置区域ID码
The SetLocaleIDs method sets the Codepage ID for the new message.
Property Subject As String
只写
邮件主题
Mail subject
Property To As String
只写
收件人地址
Comma Separated list of To recipients
Property Value(ByVal bstrHeader As String) As String
只写
邮件头文件
Arbitrary mail header value
Property Version As String
只读
发送邮件的组件版本号
The Version property returns the version number of the Collaboration Data Objects Library.
------------------
Ref:http://dev.csdn.net/develop/article/15/15809.shtm
===================================================================================
NewMail 对象(CDONTS 库) 速查 名 首次启用版本 类型 访问 Bcc 1.2 字符串 只写 ContentLocation 1.2 字符串 只写 名 首次启用版本 参数 AttachFile 1.2 Source 作为 对象 或 字符串, Send 1.2 (可选项)From 作为 字符串, NewMail 对象是完备的并且不暴露任何 公共于所有的 CDO for NTS 库对象的属性。 一旦将附件和收件人添加到 NewMail 对象,就不能清除它们了,并且 NewMail 对象本身也不能被删除。当 Send 方法成功完成任务时,NewMail 对象将失效但并不从内存中清除。程序员应该将失效对象设置为 Nothing 以便将其从内存中清除或给它重新分配另一个 NewMail 对象。企图访问已发送的 NewMail 对象将导致返回 CdoE_INVALID_OBJECT。 NewMail 对象不在包含 CDO for NTS Library 对象的层次结构中。它不能访问其他任何对象,也不能从其他对象中访问。与 Session 对象一样,它被认为是最上层的对象并且直接由 Microsoft? Visual Basic? 程序创建。其 ProgID 是 CDONTS.NewMail。下面这段代码通过早期的绑定创建了一个 NewMail 对象: Dim objNewMail As CDONTS.NewMail NewMail 对象的主要优点在于它产生和传送邮件的简单性和易用性。用户不必登录到一个会话,也不必与文件夹和邮件集合打交道。只需创建 NewMail 对象,将其发送出去,然后将其设置为 Nothing 即可。用户可以在 Send 方法的参数中提供关键信息。在多数情况下,只需 3 行代码: Set objNewMail = CreateObject("CDONTS.NewMail") 因为可以在 AttachFile 方法的参数中传递信息,所以要包含一个附件,只需在您的代码中加入一条语句即可: Set objNewMail = CreateObject("CDONTS.NewMail") --------------------------------------- http://www.yqdown.com/info/5470.htm
NewMail 对象提供只用很少的几行代码即可发送邮件的功能。
声明的类型库: CDONTS.DLL
首次启用: CDO for NTS Library 版本 1.2
父对象: (无)
子对象: (无)
默认属性: Value
属性
Body 1.2 IStream 对象或字符串 只写
BodyFormat 1.2 长整型 只写
Cc 1.2 字符串 只写
ContentBase 1.2 字符串 只写
From 1.2 字符串 只写
Importance 1.2 长整型 只写
MailFormat 1.2 长整型 只写
Subject 1.2 字符串 只写
To 1.2 字符串 只写
Value 1.2 字符串 只写
Version 1.2 字符串 只读
方法
(可选项)FileName 作为 字符串,
(可选项)EncodingMethod 作为 长整型
AttachURL 1.2 Source 作为 对象 或 字符串,
ContentLocation 作为 字符串,
(可选项) ContentBase 作为 字符串,
(可选项)EncodingMethod 作为 长整型
(可选项)To 作为 字符串,
(可选项)Subject 作为 字符串,
(可选项)Body 作为 对象 或 字符串,
(可选项)Importance 作为 长整型
SetLocaleIDs 1.2 CodePageID 作为 长整型
注释
NewMail 对象不是建立在普通的 API 体系结构上。它被 Microsoft? Windows NT? Server 中运行的自动进程用于快速产生通告邮件。它不提供任何用户接口,在邮件的产生和发送过程中也不提供任何的交互。因此 NewMail 对象的属性没有被设计成为可以回读和检查。仅除 Version 外,其他属性只能被写入。
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send("me@company.com", "you@company.com", "Hello", _
"I sent this in 3 statements!", 0) '' low importance
Set objNewMail = Nothing '' canNOT reuse it for another message
objNewMail.AttachFile("//server/schedule/sched.xls", "SCHED.XLS")
objNewMail.Send("Automated Schedule Generator", "you@company.com", _
"Schedule", "Here''s the latest master schedule", 0)
Set objNewMail = Nothing
速查
声明的类型库: CDONTS.DLL
首次启用: CDO for NTS Library 版本 1.2
父对象: (无)
子对象: (无)
默认属性: Value
属性
名 首次启用版本 类型 访问
Bcc 1.2 字符串 只写
Body 1.2 IStream 对象或字符串 只写
BodyFormat 1.2 长整型 只写
Cc 1.2 字符串 只写
ContentBase 1.2 字符串 只写
ContentLocation 1.2 字符串 只写
From 1.2 字符串 只写
Importance 1.2 长整型 只写
MailFormat 1.2 长整型 只写
Subject 1.2 字符串 只写
To 1.2 字符串 只写
Value 1.2 字符串 只写
Version 1.2 字符串 只读
方法
名 首次启用版本 参数
AttachFile 1.2 Source 作为 对象 或 字符串,
(可选项)FileName 作为 字符串,
(可选项)EncodingMethod 作为 长整型
AttachURL 1.2 Source 作为 对象 或 字符串,
ContentLocation 作为 字符串,
(可选项) ContentBase 作为 字符串,
(可选项)EncodingMethod 作为 长整型
Send 1.2 (可选项)From 作为 字符串,
(可选项)To 作为 字符串,
(可选项)Subject 作为 字符串,
(可选项)Body 作为 对象 或 字符串,
(可选项)Importance 作为 长整型
SetLocaleIDs 1.2 CodePageID 作为 长整型
注释
NewMail 对象不是建立在普通的 API 体系结构上。它被 Microsoft? Windows NT? Server 中运行的自动进程用于快速产生通告邮件。它不提供任何用户接口,在邮件的产生和发送过程中也不提供任何的交互。因此 NewMail 对象的属性没有被设计成为可以回读和检查。仅除 Version 外,其他属性只能被写入。
NewMail 对象是完备的并且不暴露任何 公共于所有的 CDO for NTS 库对象的属性。
一旦将附件和收件人添加到 NewMail 对象,就不能清除它们了,并且 NewMail 对象本身也不能被删除。当 Send 方法成功完成任务时,NewMail 对象将失效但并不从内存中清除。程序员应该将失效对象设置为 Nothing 以便将其从内存中清除或给它重新分配另一个 NewMail 对象。企图访问已发送的 NewMail 对象将导致返回 CdoE_INVALID_OBJECT。
NewMail 对象不在包含 CDO for NTS Library 对象的层次结构中。它不能访问其他任何对象,也不能从其他对象中访问。与 Session 对象一样,它被认为是最上层的对象并且直接由 Microsoft? Visual Basic? 程序创建。其 ProgID 是 CDONTS.NewMail。下面这段代码通过早期的绑定创建了一个 NewMail 对象:
Dim objNewMail As CDONTS.NewMail
Set objNewMail = CreateObject("CDONTS.NewMail")
NewMail 对象的主要优点在于它产生和传送邮件的简单性和易用性。用户不必登录到一个会话,也不必与文件夹和邮件集合打交道。只需创建 NewMail 对象,将其发送出去,然后将其设置为 Nothing 即可。用户可以在 Send 方法的参数中提供关键信息。在多数情况下,只需 3 行代码:
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send("me@company.com", "you@company.com", "Hello", _
"I sent this in 3 statements!", 0) '' low importance
Set objNewMail = Nothing '' canNOT reuse it for another message
因为可以在 AttachFile 方法的参数中传递信息,所以要包含一个附件,只需在您的代码中加入一条语句即可:
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.AttachFile("//server/schedule/sched.xls", "SCHED.XLS")
objNewMail.Send("Automated Schedule Generator", "you@company.com", _
"Schedule", "Here''s the latest master schedule", 0)
Set objNewMail = Nothing
---------------------------------------
http://www.yqdown.com/info/5470.htm
- CDONTS.NewMail 的成员(方法、属性…)
- CDONTS.NewMail
- NewMail 对象(CDONTS 库)发送邮件
- NewMail 对象(CDONTS 库)发送邮件
- CDONTS.NewMail组件介绍
- 组件CDONTS.NewMail 描述
- 用CDONTS.NewMail发邮件
- IIS邮件组件:CDONTS.NewMail
- IIS邮件组件:CDONTS.NewMail
- CDONTS.NewMail组件在使用前要配置好你的DNS服务器地址
- CDONTS.NewMail可以選用HTML格式发送Email
- CDONTS.NewMail Server 对象 错误 'ASP 0177 : 800401f3'
- 404错误的页面(CDONTS)
- ASP程序发送信件的2种方法(JMAIL、CDONTS)
- IHTMLDocument2的所有成员、属性、方法、事件
- IHTMLDocument2的所有成员、属性、方法、事件
- 类 对象 属性 方法 类的成员
- 修改私有成员(类成员)/只读成员的属性
- 摘:用托盘控制windows服务的c#实现
- 摘:解读C#中的正则表达式
- 找工作
- 初步整理RFC2661
- Pb问题:Nested Report在数据窗口里只有一条记录会显示数据,其它都不会显示?
- CDONTS.NewMail 的成员(方法、属性…)
- BREW™ SDK入门篇(二)
- 薪水是调节员工工作情绪的核武器。如果只有这个核武器的话,公司的管理一定有问题!
- 了解编程的心理
- Computing with huge integer
- moto面试惨被淘汰
- 在春季结束时及时地比只夏日FEEL的SLOW DANCE来
- Linux與嵌入式
- 关于openh323在windows上编译