W3 Jmail中文使用說明

W3 Jmail中文使用說明
W3 Jmail 使用說明

jmail.smtpmail

Body : String
(v3.0)
信件體,正文,使用AppendText追加內容
如: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)
信件的contentype. 缺省是"text/plain",但是可以設置爲其他你想要的類型.
如果你以HTML格式發送郵件, 改爲"text/html"即可。
如:JMail.ContentType = "text/html"
DeferredDelivery : Date
(v3.0)
設置延期發送. 如果郵件服務器支持的話,消息到了這個時間纔會發送
如:(Javascript)JMail.DeferredDelivery = new Date( 2000, 02, 17 ).getVarDate();
Encoding : String
(v3.0)
這個屬性可以用來改變附件編碼方式(缺省是"base64). 可以選擇使用的是"base64", "uuencode" or "quoted-
printable"
如:JMail.Encoding = "base64"
ErrorCode : Integer
(v3.0)
如果JMail.silent設置爲true,ErrorCode包含的是錯誤代碼
如:Response.Write( JMail.ErrorCode );
ErrorMessage : String
(v3.0)
如果JMail.silent設置爲true,包含的是錯誤信息
如:Response.Write( JMail.ErrorMessage );
ErrorSource : String
(v3.0)
Contains the error source if JMail.silent is set to true
如:Response.Write( JMail.ErrorSource );
ISOEncodeHeaders : Boolean
(v3.0)
是否將信頭編碼成iso-8859-1字符集. 缺省是true
如:JMail.ISOEncodeHeaders = false
Lazysend : Boolean
(v3.0)

這個屬性指定Jmail是否一直等到mail發送瞭然後返回,或者緩衝這條消息然後在後臺發送。
然而設置了這個屬性,你就不能控制錯誤信息。
注意:如果選擇了這個選項,屬性ServerAddress將無效,lazysend將通過dsn查詢決定郵件服務器,
在一些設置裏面,這可能有問題。
如:JMail.LazySend = true;
Log : String
(v3.0)
Jmail創建的日誌,如果loging屬性設置爲true
如:Response.Write( JMail.Log );
Logging : Boolean
(v3.0)
是否使用日誌
如:JMail.Logging = true
MailDomain : String
(v3.0)
This can be used to override the EHLO/HELO statement to your mailserver
如:JMail.Maildomain = "hello.world.com"
MimeVersion : String
(v3.0)
指定mime版本。缺省是"1.0"
如:JMail.MimeVersion = "1.0"
Priority : Integer
(v3.0)
優先級. 範圍在1-5之間
1 高優先級. 有些郵件程序稱之爲緊急
2 也是高優先級
3 普通優先級
4 低優先級
5 最低的優先級
如: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)
指定郵件服務器的地址。可以指定多個服務器,用分號點開。可以指定端口號。
如果serverAddress保持空白,JMail會嘗試解決遠程郵件服務器,然後直接發送到服務器上去。
如:JMail.ServerAddress = "mail.mydom.net; mail2.mydom.net:2500"
Silent : Boolean
(v3.0)
如果設置爲true,JMail不會拋出例外錯誤. JMail.execute() 會根據操作結果返回true或false
如:JMail.silent = true
SimpleLayout : Boolean
(v3.0)
設置爲true,減少Jmail產生的header信頭
如:JMail.SimpleLayout = true
Subject : String
(v3.0)
設定消息的標題
如:JMail.Subject = "Dimac rocks big time!"
UsePipelining : Boolean
(v3.0)
Overrides if JMail should use pipelining on a server that supports it.
如:JMail.Pipelining = false
AddAttachment( FileName, [ContentType] )
(v3.0)
添加文件附件到信件
如:JMail.AddAttachment( "c://autoexec.bat" );
AddCustomAttachment( FileName, Data )
(v3.0)
添加自定義附件. This can be used to attach "virtual files" like a generated text string or
certificate etc.
如:JMail.AddCustomAttachment( "readme.txt", "Contents of file" );
AddHeader( XHeader, Value )
(v3.0)
添加用戶定義的X-header到message
如:JMail.AddHeader( "Originating-IP","193.15.14.623" );
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" );
AddURLAttachment( bstrURL, bstrAttachAs, [bstrAuth] )
(v3.0)
下載並添加一個來自url的附件. 第二個參數"AttachAs", 被用來指定信件收到後的文件名. 第3個可選參數是用
來可選的WWW-鑑定.
如:JMail.AddURLAttachment( "http://download.dimac.net/jmail/jmail.exe", "jmail.exe" )
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關閉緩衝的與郵件服務器的連接
如:JMail.Close();
Execute() : Boolean
(v3.0)
執行郵件的發送
如:JMail.Execute();
ExtractEmailAddressesFromURL( bstrURL, [bstrAuth] )
(v3.0)
從一個url下載和添加email地址
如:JMail.ExtractEmailAddressesFromURL( "http://duplo.org/generateEmailList.asp" );
GetMessageBodyFromURL( bstrURL, [bstrAuth] )
(v3.0)
清除message的正文,並用url的內容替換。Contenttype 會自動設置成URl的contentyp。第二參數(login and
password)是可選的。
如:JMail.GetMessageBodyFromURL( "http://duplo.org/", "login:password" )

LogCustomMessage( Message )
(v3.0)
將用戶自定義消息加入JMail日誌. 只有屬性loging設置爲true時,這項功能才能起作用
如:JMail.LogCustomMessage( "Hello world" );

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章