Can any one tell me about the SMTP setting to send email by VB6 program in WindowsXP environment?
Question by Jack J: Can any one tell me about the SMTP setting to send email by VB6 program in WindowsXP environment?
Hell
I have a program which require to send email from by VB6 coding using SMTP.
But I dont know about the setting of SMTP. I have WindowsXP with IIS intstalled.
Or tell me a simple way by which I can create a Smail program by VB6 and its requirement.
I have also tried to send email by MS-Outlook it also giving error due to SMTP
Best answer:
Answer by abhay t
use the function given below
Dim ObjMail As CDO.Message
Set ObjMail = CreateObject(“CDO.Message”)
ObjMail .Configuration.Fields(cdoSMTPServer) =”SMTPServer Name”
ObjMail .Configuration.Fields.Update
ObjMail .To = “xyz.com”
ObjMail .From = “abc.com”
ObjMail .Subject = “test”
ObjMail .TextBody = “Hello.”
ObjMail .AddAttachment (“temp.txt”)
ObjMail .Send
Set ObjMail = Nothing
Give your answer to this question below!













Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject(“Outlook.Application”)
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = “you@email.com
.Cc = “ifneed@copy.com”
.Subject = “Hello World (one more time)…”
.Body = “This is the body of message”
.HTMLBody = “HTML version of message”
.Attachments.Add (“c:myFileToSend.txt”)
.Send ‘Let´s go!
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
tats it u r done…