Jobs
Author: M.Hari Hara Subramanian Date Submitted: 3/2/2005 Category: Microsoft Controls Compatibility: VB 6 This code has been accessed 18251 times.
Email Yourself this snippet:
Dim cdoObj As CDO.Message Dim iConf As CDO.Configuration Dim str As String 'add reference ' Microsoft CDO Exchange 2000 Library
Code
Set cdoObj = CreateObject("cdo.message") 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"