Send Mail Using Visual Basic
Send Mail Using Visual Basic
API Declarations
Dim iConf As CDO.Configuration
Dim str As String
'add reference ' Microsoft CDO Exchange 2000 Library
Rate Send Mail Using Visual Basic
(1(1 Vote))
Set iConf = CreateObject("CDO.Configuration")
Set iFields = iConf.Fields
iFields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' SMTP
iFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.0.1"
iFields.Update
Set cdoObj.Configuration = iConf
str = vbNullString
cdoObj.Subject = "Hai Check mail"
str = str & " <html> hai this is a check mail"
str = str & " </html>"
cdoObj.HTMLBody = str
cdoObj.To = "" 'type your friend email id
cdoObj.CC = ""
cdoObj.From = "" ' type your mail id
cdoObj.Send
MsgBox "Mails send sucessfully"
Send Mail Using Visual Basic Comments
No comments yet — be the first to post one!
Post a Comment