????? ????? ????? ?????? ?????????? ???????? CDOSYS ??????? SMTP ?????? ?? Visual Basic .NET

?????? ????????? ?????? ?????????
???? ???????: 313773 - ??? ???????? ???? ????? ????? ??? ???????.
????? ADO ? MD ADO ?? ??? ???? ???? ???????? ?? ???? Microsoft .NET Framework. ?? ???? ??? ??? ???? ?????? ?????? ???? ?? ????????? ???????? ??? ???? ?? ?? ??????? ??? ?????? ??????? ????????. ??? ??????? ???????? ???? ??? ???????? ?? ??? ??????? ??? ?????? ???? ????? ??????? ??? ADO.NET. ??? ??????? ??? ???????? ??? ??? ????? ?????? ????? ?????? ?? ??? ???? ?????? ?????. ?? ?? ???????? ???? ???? ?? ???? ??????? ADO ?? MD ADO ???? ??????? ??? ??????. ????? ?? ?????????? ???? ??????? ??????? ?? "????? ??????? ?? Microsoft:
840667 ???? ????? ??? ?????? ??? ??????? ADO ? MD ADO ?? ????? .NET Framework
????? ???? | ?? ????

??????

???? ??? ??????? ????? ??????? ?????? ?????? ??????? (CDO) ????? Microsoft Windows 2000 ? ?????? SMTP ?????? ?????? ????? ???? ???????? HTML ???????? Microsoft Visual Basic .NET. ??? ????? ??? ??????? ??? ???? ???? ?????? ??? ????? ????? ?????? ?????????? ???? SMTP.

??????? ????

  1. ??? ????? Microsoft Visual Studio .NET.
  2. ?? ??????? ???? ??? ??? ???? ?? ???? ??? ???????.
  3. ??? ????? Project ? ???? ??? ?????? Visual Basic.
  4. ??? ????? ? ???? ??? ????? ???? ?????? ?? ???? ??? ?????.

    ?????????? ??? ????? Module1.vb.
  5. ????? ???? ??? CDO Microsoft ?????? Windows 2000. ?????? ????? ???? ??????? ???????:
    1. ?? ??????? ??????? ???? ??? ????? ????.
    2. ??? ????? ??????? "COM" ? ???? ??? CDO ?? Windows 2000 ????? Microsoft ?? ???? ??? ?????.
    3. ?? ???? ?????? ????? ????? ? ???? ??? ????? ????? ?????????. ??? ????? ???? ?????? wrappers ???????? ???? ?????? ???? ??? "???".
  6. ???? ???????? 5a ???? 5 c ?????? ???? ??? ????? 2.5 ?????? ?????? ActiveX Microsoft.
  7. ?? ???? ????????? ???????? ??????? ???? ????????? ???????? ??: oMsg
    Imports System.Reflection
    
    Module Module1
    
        Sub Main()
            Dim oMsg As CDO.Message = New CDO.Message()
            oMsg.From = "from@microsoft.com"
            oMsg.To = "to@microsoft.com"
            oMsg.Subject = "CdoSys HTML mail in VB.NET (pickup)"
    
            Dim sHtml As String
            sHtml = "<HTML>" & _
             "<HEAD>" & _
             "<TITLE>Simple CDOSYS Message</TITLE>" & _
             "</HEAD>" & _
             "<BODY><P>" & _
             "<h1><Font Color=Green>Simple CDOSYS HTML Message</Font></h1>" & _
             "</BODY>" & _
             "</HTML>"
    
            oMsg.HTMLBody = sHtml
    
            ' Set configuration.
            Dim iConfg As CDO.Configuration = New CDO.Configuration()
    
            Dim oFields As ADODB.Fields
            oFields = iConfg.Fields
    
            Dim oField As ADODB.Field
            oField = oFields("http://schemas.microsoft.com/cdo/configuration/sendusing")
            oField.Value = 1   ' Sets the configuration to use the local SMTP server.
    
            oFields.Update()
            oMsg.Configuration = iConfg
    
            oMsg.Send()
    
            oMsg = Nothing
            iConfg = Nothing
            oFields = Nothing
            oField = Nothing
        End Sub
    
    End Module
    					
  8. ????? ?? "TODO" ?? ????????? ???????? ?? ?? ?????? ????????? ???????? ?????? ?????? ??.
  9. ???? F5 ?????? ? ?????? ????????.
  10. ???? ?? ?? ????? ?????? ?????????? ?? ?? ??????? ???????.

???????

???? ???????: 313773 - ????? ??? ??????: 19/?? ??????/1428 - ??????: 3.2
????? ???
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
  • Microsoft Collaboration Data Objects 2.0
????? ??????: 
kbmt kbmsg kbcode kbxml kbhowtomaster KB313773 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????313773

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

 

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