English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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.

2006-12-27 19:02:24 · 2 answers · asked by Jack J 1 in Computers & Internet Programming & Design

I have also tried to send email by MS-Outlook it also giving error due to SMTP

2006-12-27 19:04:18 · update #1

2 answers

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

2006-12-27 19:23:08 · answer #1 · answered by abhay t 1 · 0 0

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...

2006-12-27 19:24:54 · answer #2 · answered by sweetraskels 4 · 0 0

fedest.com, questions and answers