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!