HI,
Below is the code in vb to send mail using CDO object. I
want to do the same in VB.Net , i need to know how to sent
the authentication in vb.net "
..Item(cdoSMTPA uthenticate) = cdoBasic"
VB
-------------------------------------------------------
Dim iMsg as New CDO.Message
Dim iConf as New CDO.Configurati on
Dim Flds as ADODB.Fields
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUs ingMethod) = cdoSendUsingPor t
.Item(cdoSMTPSe rverName)
= "somehost@micro soft.com"
.Item(cdoSMTPCo nnectionTimeout ) = 10 ' quick timeout
.Item(cdoSMTPAu thenticate) = cdoBasic
.Item(cdoSendUs erName) = "username"
.Item(cdoSendPa ssword) = "password"
.Item(cdoURLPro xyServer) = "server:80"
.Item(cdoURLPro xyBypass) = "<local>"
.Item(cdoURLGet LatestVersion) = True
.Update
End With
With iMsg
Set .Configuration = iConf
.To = """User A"" <userA@microsof t.com>"
.From = """User B"" <userB@microsof t.com>"
.Subject = "Hows it going? I've attached my web
page"
.CreateMHTMLBod y "http://mypage"
.AddAttachment "C:\files\myboo k.doc"
.Send
End With
-------------------------------------------------------
thanks
Below is the code in vb to send mail using CDO object. I
want to do the same in VB.Net , i need to know how to sent
the authentication in vb.net "
..Item(cdoSMTPA uthenticate) = cdoBasic"
VB
-------------------------------------------------------
Dim iMsg as New CDO.Message
Dim iConf as New CDO.Configurati on
Dim Flds as ADODB.Fields
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUs ingMethod) = cdoSendUsingPor t
.Item(cdoSMTPSe rverName)
= "somehost@micro soft.com"
.Item(cdoSMTPCo nnectionTimeout ) = 10 ' quick timeout
.Item(cdoSMTPAu thenticate) = cdoBasic
.Item(cdoSendUs erName) = "username"
.Item(cdoSendPa ssword) = "password"
.Item(cdoURLPro xyServer) = "server:80"
.Item(cdoURLPro xyBypass) = "<local>"
.Item(cdoURLGet LatestVersion) = True
.Update
End With
With iMsg
Set .Configuration = iConf
.To = """User A"" <userA@microsof t.com>"
.From = """User B"" <userB@microsof t.com>"
.Subject = "Hows it going? I've attached my web
page"
.CreateMHTMLBod y "http://mypage"
.AddAttachment "C:\files\myboo k.doc"
.Send
End With
-------------------------------------------------------
thanks
Comment