Send Email whith VB6, very easy.
Send Email whith VB6, very easy.
API Declarations
Microsoft Outlook 9.0 Object Library
Microsoft Data Formatting Object Library 6.0(SP4)
Rate Send Email whith VB6, very easy.
(1(1 Vote))
'programmation de l'envoi d'un e-mail
Dim objOutlook As Outlook.Application
Dim objSession As Outlook.NameSpace
Dim objMessage As Outlook.MailItem 'Object
Dim objRecipient As Object
Dim fichier_joint As String
Dim adresse As String
fichier_joint = "c:\test.txt"
adresse = "[email protected]"
Set objOutlook = CreateObject("Outlook.Application")
Set objSession = objOutlook.GetNamespace("MAPI")
Set objMessage = objOutlook.CreateItem(olMailItem)
Set objRecipient = objSession.CreateRecipient(adresse)
objSession.Logon
objMessage.Recipients.Add (objRecipient)
objMessage.Subject = "Test"
objMessage.Body = "This is a Test"
objMessage.Attachments.Add (fichier_joint)
objMessage.Send
' objMessage.Display
MsgBox "Message sent successfully!"
Set objRecipient = Nothing
objSession.Logoff
End Sub
Send Email whith VB6, very easy. Comments
No comments yet — be the first to post one!
Post a Comment