????? ????? ????? ??????? SMTP ??????? ?? Visual Basic

?????? ????????? ?????? ?????????
???? ???????: 317327 - ??? ???????? ???? ????? ????? ??? ???????.
?????? ??? ????? Microsoft Visual Basic Scripting Edition ?? ??? ???????? ???? 317680.
????? ???? | ?? ????

?? ??? ??????

????? ???

???? ??? ??????? ???? ????? ????? ??????? SMTP ???? ????? ????? ?????? ????? ??? ????? ?????? ?????????? SMTP ???????.

????? ???? ?????

  1. ????? DLL ActiveX "Visual Basic Microsoft. ??? ??????? SMTPEventSink ?? ?? ?????? ???? ????? ?????????.
  2. ??? ????? Project ????? CDO Microsoft Exchange 2000 ??????? ?? ?? ?????? "????? COM ?????? ???? ??????".
  3. ?? ????????? ???????? ??????? ?? ?????? ???????:
    Dim TextDisclaimer As String
    Dim HTMLDisclaimer As String
    
    Implements IEventIsCacheable
    Implements CDO.ISMTPOnArrival
    
    Private Sub IEventIsCacheable_IsCacheable()
        'Just returns S_OK.
    End Sub
    
    Private Sub Class_Initialize()
      'TODO: Replace the sample disclaimer text with your own text.
      TextDisclaimer = vbCrLf & "DISCLAIMER:" & vbCrLf & "Sample Disclaimer Text."
      HTMLDisclaimer = "<p></p><p>DISCLAIMER:<br>Sample Disclaimer Text"
    End Sub
    
    Private Sub ISMTPOnArrival_OnArrival(ByVal Msg As CDO.IMessage, EventStatus As CDO.CdoEventStatus)
        If Msg.HTMLBody <> "" Then
            Dim szPartI As String
            Dim szPartII As String
            Dim pos As Integer
            
            'Search for the "</body>" tag and insert the disclaimer before that tag.
            pos = InStr(1, Msg.HTMLBody, "</body>", vbTextCompare)
            szPartI = Left(Msg.HTMLBody, pos - 1)
            szPartII = Right(Msg.HTMLBody, Len(Msg.HTMLBody) - (pos - 1))
            Msg.HTMLBody = szPartI + HTMLDisclaimer + szPartII
        End If
    
        If Msg.TextBody <> "" Then
            Msg.TextBody = Msg.TextBody & vbCrLf & TextDisclaimer & vbCrLf
        End If
        
        'Commit the content changes to the transport ADO Stream object.
        Msg.DataSource.Save
        EventStatus = cdoRunNextSink
    End Sub
    					
  4. ??????? ?? ??????? ????? ?? ???? ????? ????????? ??? ?? ????? DLL.

????? ???? ?????

?????? ???? ????? ??????? ??? Smtpreg.vbs ??????? ?? ?????? ????? ??????? (SDK) Exchange.
  1. ?? ???? ???????, ??? ???? ?????? \Exchange SDK\SDK\Support\CDO\Scripts ??? ?? ???? ?? ???: cscript smtpreg.vbs / add 1 SMTPEventSink.Disclaimer SMTPDisclaimer OnArrival "?????? from=*@your-domain-here.com"

    ??? ??? ??? ????? ????? ????? ???? ???? ?? ?????? ?????? ???????? ?????.
  2. ????? ????? ??? ?????, ???? ?? ???: cscript smtpreg.vbs/????? SMTPDisclaimer OnArrival 1
?????? ??? ??????? ?????? ??? ????? ?????? ??? ????? ?? ?????? ???? ???? ????? Microsoft (MSDN) ?????? ??? ?????:
http://msdn2.microsoft.com/en-us/library/ms526620.aspx

?????? ???? ?????

??????? ???? ????? ?????? ????? ???? ???????? ??? ????? SMTP "????? ?????? ??????? ?????? ??. ????? ??????? ????? ????? ?? ?? ??????? ??????? ??? ????? ???????.

?????? ??? ??? ?????? ???? MAPI ??? Microsoft Outlook ????? ????? ?????? ?????????? ??????? ?? ????? ????? ???? ???????? ?? ???????. ????? ??? ??? ?? ????? ?????? ?????????? ???? ?? ??????? ???????? MAPI ??? ?????? SMTP ????? ???? ????? ?????? ?????????? ????? ??? SMTP. ????? ?? ??? ??????? ????????? ???? ??? ??????? ?????? ??? ?????.

?????

?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
273233?? ???? ????? ??????? ??????? MAPI ?? ???? ??? SMTP CDO

???????

???? ???????: 317327 - ????? ??? ??????: 20/?? ??????/1428 - ??????: 8.7
????? ???
  • Microsoft Exchange Server 2003 Standard Edition
  • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Exchange 2000 Server Standard Edition
  • Collaboration Data Objects for Exchange 2000
  • Microsoft Collaboration Data Objects 2.0, ????? ?????? ??:
    • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
    • the operating system: Microsoft Windows 2000
????? ??????: 
kbmt kbhowtomaster KB317327 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????317327

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com