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

???? ?????? ???? ??????
???? ID: 313775 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
???????ADO ?? ADO MD ?? ??? ???? ???? ??? ???? ??? ??????? ?? Microsoft .NET Framework ??????? ???? ?? ?????? ????? ??? multithreaded ????????? ?? ????-?????? ????????? ??? ????? ??? ?? ???? ?? ???? ??? ?? ???? ??? discussed ??????? ???? ????? ???? ???? ????? ??? ??????? ????? ?? ??? ??? ADO.NET ???? ?? ??? ????????? ?? ?????? ?? ?? ??????? ?? ????? ???? ??? ???? ?????, ???? ?? ??? ?? ????????? ???? ?? ??? ??? ?????? ???????? ?? ??? ????? ??????? conducted ??? ???? ?? ?????? ?? ???? ?? ????? ?? ADO ?? ADO MD ?? ????? ?? ??? ??? ?? ???????? ??? ???? ??????? ?? ???, Microsoft ???????? ??? ?????????? ???? ?????::
840667??? .NET Framework ????????? ??? ADO ?? ADO MD ?? ????? ???? ??? ????????? ????????? ??????? ????
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

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

???? ???????

????? ?? ??? ??? ?-??? ????? SMTP ????? ?? ????? ???? ???, ????? ????? ?? ???? ????:
  1. Microsoft Visual Studio .NET ???? ????..
  2. ????? ???????????? ??,????? ????-????? ????, ?? ???? ????????????.
  3. ?????Visual Basic ????????? ??????????, ????? ????????? ?????????.

    ???????? ??? ??, Module1.vb ???? ???? ???
  4. Microsoft CDO ?? ??? Windows 2000 ????????? ?? ??? ??? ?????? ??????? ??? ???? ?? ???, ?????????? ????? ?? ???? ????.:
    1. ????? ????????????????? ??,?????? ??????.
    2. ????? ????COM??? ??, ??????Windows 2000 ????????? ?? ??? Microsoft CDO?? ????-????? ????, ?? ???? ?????? ????.
    3. ??????????? ??????????? ????? ???, ????? ????OK.
    4. ??? ?? ????????? ?? ?? ???? ?????? ????? ???? ?? ??? wrappers ????? ???? ?? ??? ??? ???, ?? ????? ???????.
  5. Microsoft ActiveX ???? ???????? 2.5 ????????? ??? ?????? ????? ?? ??? 4 ??? ?? ????????
  6. ??? ????? ??? ??? ?? ????? ??? ?? ?????:
    Imports System.Reflection
    
    Module Module1
    
        Sub Main()
            Dim oMsg As CDO.Message = New CDO.Message()
            Dim iConfg As CDO.Configuration
            Dim oFields As ADODB.Fields
            Dim oField As ADODB.Field
     
            iConfg = oMsg.Configuration
            oFields = iConfg.Fields
    
            oField = oFields("http://schemas.microsoft.com/cdo/configuration/sendusing")
            oField.Value = CDO.CdoSendUsing.cdoSendUsingPort
    
           ' TODO: Replace with the port that you want to use . It must be the same
           ' port that the SMTP server is using.
           oField = oFields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
            oField.Value = 25
    
            ' TODO: Replace with your SMTP server.
            oField = oFields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
            oField.Value = "<SMTP Server>"
    
            oFields.Update()
            oMsg.Configuration = iConfg
    
            oMsg.TextBody = "Test message body."
            oMsg.Subject = "Test SMTP Message Send using port"
            oMsg.From = "from@example.com"
            oMsg.To = "to@example.com"
    
            oMsg.Send()
    
            oMsg = Nothing
            iConfg = Nothing
            oFields = Nothing
            oField = Nothing
        End Sub
    
    End Module
    					
  7. ??? ??? TODO ?? ??? ???, ?? ??? ???? ?????? ?? ??? ??? ??????? ?????
  8. ????????? ?? ????? ?? ????? ?? ??? F5 ?????..
  9. ????????? ???? ?? ?-??? ????? ???? ?? ??????? ???? ??? ???

???

???? ID: 313775 - ????? ???????: 04 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
??????: 
kbhowto kbcode kbxml kbmsg kbmt KB313775 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:313775

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

 

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