Dim lngUserRecno AsLong lngUserRecno = IsValidADSUser()
If lngUserRecno <0Then If intADSAuthFlag = ADSAUTH_SYSTEM Then Dim sIISAuth AsString sIISAuth = m_pfs.dfVntToTrimStr(m_objRequest.ServerVariables("AUTH_TYPE"))
If sIISAuth =""Then 'm_objResponse.Write "ADS Error: Your setting is forbidden to anonymous user." m_objResponse.Status ="401 Unauthorized - Logon failed" m_objResponse.AddHeader "WWW-Authenticate", "BASIC" m_objResponse.End ExitFunction EndIf EndIf lngUserRecno = ADSAuthUser()
EndIf If lngUserRecno <=0Then If intADSAuthFlag = ADSAUTH_SYSTEM Then m_objResponse.Redirect sErrorNoRightUrl
m_objResponse.End Else m_objResponse.Redirect sLogonUrl &"?ReturnUrl="& m_objServer.URLEncode(sReturnUrl)
m_objResponse.End EndIf EndIf
Dim strSimplifiedChinese, strTraditionalChinese AsString strSimplifiedChinese ="我是中国人!" strTraditionalChinese = StrConv(strSimplifiedChinese, VbStrConv.TraditionalChinese) '简转繁 Console.Write(strTraditionalChinese)
strSimplifiedChinese = StrConv(strTraditionalChinese, VbStrConv.SimplifiedChinese) '繁转简 Console.Write(strSimplifiedChinese)
'Set bps = .BodyPart.BodyParts 'Set bp = bps.Add ' bps.Delete bp Sub SaveMessageToFile(iMsg As CDO.Message, Filepath AsString)
Dim Stm AsNew Stream
Stm.Open
Stm.Type = adTypeText
Stm.Charset ="US-ASCII" Dim iDsrc As IDataSource
Set iDsrc = iMsg
iDsrc.SaveToObject Stm, "_Stream" Stm.SaveToFile Filepath, adSaveCreateOverWrite
End Sub
PrivateSub CreateFolder(sName AsString, aDefaultContentClass As Variant, sMAPIFolderClass AsString)
Dim recADO AsNew ADODB.Record
recADO.Open sName, connADO, adModeReadWrite, adCreateCollection
recADO.Fields("DAV:contentclass").Value ="urn:content-classes:folder" recADO.Fields("http://schemas.microsoft.com/exchange/outlookfolderclass") = sMAPIFolderClass
recADO.Fields("urn:schemas-microsoft-com:exch-data:expected-content-class").Value = aDefaultContentClass
recADO.Fields("urn:schemas-microsoft-com:exch-data:schema-collection-ref").Value = sCustomSchemaFolder
recADO.Fields.Update
recADO.Close
End Sub
Email Creation:
Two ways you might attack it.
1. You can do a global event sink on a mailbox store. Capturing creation
events of certain folders would likely give you mailbox creation events.
2. Use the LDAP change notification mechanism to monitor AD for changes that
indicate mailbox creations. This is potentially easier because you can
watch in a single place instead of on every store of every server. This
also will catch the situation where an account gets "Mailbox enabled" but
the folders don't actually get created on the store until much much later. Andy
"David Eales"<d.eales@Staff.covcollege.ac.uk> wrote in message
news:035d01c2bf2b$408c4a30$8af82ecf@TK2MSFTNGXA03 > Hi,
> >Is there a way todo an event sink so that when a new > mailbox is created a notification is sent to a certain
> address via email.
> > Thanks
Exchange_Delete_Attachment
Set objAttachments = objMessage.Attachments
If objAttachments.Count <>0Then ForEach objAttachment In objAttachments
With objAttachment
If .FileName ="TEST.DOC"Then objAttachments.Delete objAttachment
objMessage.DataSource.Save
EndIf EndWith Next EndIf
Exchange里各文件的作用.txt
* .edb,.stm
priv1.ebd,priv1.stm MailBox Store
pub1.ebd, pub1.stm Public Folder Store
My store.ebd,My Store.stm Your Store
With Exchange 2000, each Exchange 2000 database is contained in two linked files — the .edb and the .stm. The .edb file contains folders, tables, and indexes for messaging data and MAPI messages and attachments. The .stm file contains native Internet content. When performing backup and restore procedures, you must always treat these two files as one.
* .log E0000001.LOG E000????.LOG res1.log res2.log Exchange 2000 also uses write-ahead transaction log files to ensure the efficient processing of Exchange 2000 data. Write-ahead is the process of writing transactions sequentially in transaction logs before writing them in bulk to the database files. Because log files store copies of the transactions, this process ensures that transactions are never lost before they are written to the databases in bulk.
Each storage group also maintains two log files (Res1.logand Res2.log) that functionas placeholders for extra disk spaceon the hard disk containing the log files. If the drive containing the log files runs out of disk space, Res1.logand Res2.log allow the database files in the storage group to shut down in a consistent state.
* .chk
E00.CHK
E00.log Checkpoint files store information that indicates when a transaction is successfully saved to the database files on the hard disk. A checkpoint file is maintained for the series of log files within each storage group. Separate E<nn>.chk files (where <nn> refers to the log file prefix for the storage group) point to the oldest log file that has all transactions successfully committed to the database
posted @
2005-02-03 01:21Benny Ng
阅读(276)
评论(0)
收藏举报