精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● ASP>>邮件编程>>jmail的属性和方法(转)

主题:jmail的属性和方法(转)
发信人: qcrsoft(网痞)
整理人: qcrsoft(2002-02-03 23:01:10), 站内信件
属性:
Body : String
(v3.0) 
E-Mail的主体
JMail.Body = "Hello world"


Charset : String
(v3.0) 
设定邮件的字符集,默认为"US-ASCII"
JMail.Charset = "US-ASCII"


ContentTransferEncoding : String
(v3.0) 
指定内容编码, 默认为 "Quoted-Printable" 
JMail.ContentTransferEncoding = "base64"


ContentType : String
(v3.0) 
这个邮件的头设置, 默认为 "text/plain" 能设
置成你需要的任何情况。 你想发送HTML信息,改这个头文件为 "text/html" 
JMail.ContentType = "text/html"


DeferredDelivery : Date
(v3.0) 
设置时间。 如果MAILSERVER服务器支持,可以设置何时发送邮件。 
JMail.DeferredDelivery = new Date( 2000, 02, 17 ).getVarDate();


Encoding : String
(v3.0) 
This can be used to change the default Attachment encoding from base64. Valid options are 


"base64", "uuencode" or "quoted-printable" 
JMail.Encoding = "base64"


ErrorCode : Integer
(v3.0) 
报错误信息,如果JMail.silent被设置成true 
Response.Write( JMail.ErrorCode )


ErrorMessage : String
(v3.0) 
报错误信息,如果JMail.silent被设置成true 
Response.Write( JMail.ErrorMessage )


ErrorSource : String
(v3.0) 
报错误信息,如果JMail.silent被设置成true 
Response.Write( JMail.ErrorSource )


ISOEncodeHeaders : Boolean
(v3.0) 
头信息代码按照iso-8859-1字符设置。 The default is true. 
JMail.ISOEncodeHeaders = false


Lazysend : Boolean
(v3.0) 
这个属性是将邮件放入缓冲直至发出为止,的不到任何的错误信息
JMail.LazySend = true;


Log : String
(v3.0) 
当loging被设置后,这个LOG被JMAIL生成
Response.Write( JMail.Log )


Logging : Boolean
(v3.0) 
能/不能登陆用JMAIL
JMail.Logging = true


MailDomain : String
(v3.0) 
可以忽略 EHLO/HELO 状态对你的mailserver 
JMail.Maildomain = "hello.world.com"


MimeVersion : String
(v3.0) 
专门的 mime 版本. The default is "1.0" 
JMail.MimeVersion = "1.0"


Priority : Integer
(v3.0) 
邮件的优先级,可以范围从1到5。
越大的优先级约高,比如,5最高,1最低
一般设置为3
JMail.Priority = 3


Recipients : String
(v3.0) 
这个信息的接收者只有只读属性
Response.Write( "" + JMail.Recipients + "" )


ReplyTo : String
(v3.0) 
指定一个可选的回信地址
JMail.ReplyTo = "[email protected]"


ReturnReceipt : Boolean
(v3.0) 
是否按寄件人的要求回信,默认是"false" 
JMail.ReturnReceipt = true


Sender : String
(v3.0) 
邮寄的地址
JMail.Sender = "[email protected]"


SenderName : String
(v3.0) 
收信人姓名
JMail.SenderName = "Bat man"


ServerAddress : String
(v3.0) 
SERVER的地址。可以有很多的SERVER地址,后可跟端口号
JMail.ServerAddress = "www.zwcity.com; www.zwcity.com"


Silent : Boolean
(v3.0) 
设置成TRUE后JMAIL将检查所有的邮件在 JMail.execute() 执行后
返回真或假根据信件发送的成功与否depending on the success of the operation 


JMail.silent = true


SimpleLayout : Boolean
(v3.0) 
设置成TRUE减少JMAIL产品头数量
JMail.SimpleLayout = true


Subject : String
(v3.0) 
邮件的标题。
JMail.Subject = "Dimac rocks big time!"



UsePipelining : Boolean
(v3.0) 
管道的支持。
JMail.Pipelining = false


 


JMAIL的方法


AddAttachment( FileName, [ContentType] ) 
(v3.0) 
加入一个附件
JMail.AddAttachment( "c:\\autoexec.bat" );


AddHeader( XHeader, Value ) 
(v3.0) 
加入一个头信息
JMail.AddHeader( "Originating-IP","192.168.0.1" );


AddNativeHeader( Header, Value ) 
(v3.0) 
加入一个头信息
JMail.AddNativeHeader( "MTA-Settings", "route" );


AddRecipient( Email ) 
(v3.0) 
加入一个收件者
JMail.AddRecipient( "[email protected]" );


AddRecipientBCC( Email ) 
(v3.0) 
屏蔽某个接受者。不给其发送邮件
JMail.AddRecipientBCC( "[email protected]" );


AddRecipientCC( Email ) 
(v3.0) 
抄写一份给另一接受者
JMail.AddRecipientCC( "[email protected]" );


AddRecipientEx( Email, Name ) 
(v3.0) 
加入和邮件相对应的名称
JMail.AddRecipientEx( "[email protected]", "Dimac INFO" );


AppendBodyFromFile( FileName ) 
(v3.0) 
将文件的内容发送出去
JMail.AppendBodyFromFile( "c:\\mytext.txt" );


AppendText( Text ) 
(v3.0) 
添加附件
JMail.AppendText( "Text appended to message Body" );


ClearAttachments() 
(v3.0) 
清除附件列表
JMail.ClearAttachments();


ClearCustomHeaders() 
(v3.0) 
清空所有的用户头信息
JMail.ClearCustomHeaders();


ClearRecipients() 
(v3.0) 
清空收件箱
JMail.ClearRecipients();



Close() 
(v3.0) 
强行制止邮件的发送
JMail.Close();


Execute() : Boolean
(v3.0) 
执行邮件发送到SERVER
JMail.Execute();


ExtractEmailAddressesFromURL( bstrURL, [bstrAuth] ) 
(v3.0) 
从URL或下载加入邮件地址
JMail.ExtractEmailAddressesFromURL( "http://www.zwcity.com " );


LogCustomMessage( Message ) 
(v3.0) 
登陆用户信息到JMAIL的LOG,这个功能只有将LOGING设置为TRUE时可以用
JMail.LogCustomMessage( "Hello world" ); 

Jmail邮件服务器下载地址

[关闭][返回]