Send Emails with Outlook by Api

P

peterfarge

Hello NG,

I want to send Emails with MS Outlook by a plain C dll function. Has
someone an example how to control Outlook by API?

Or I must translate this VBA Macro I have found in the internet:
Private Sub SendMailExample()
Dim olApp As Outlook.Application
Dim oItem As Outlook.MailItem

Set olApp = New Outlook.Application
Set oItem = olApp.CreateItem(Outlook.OlItemType.olMailItem)
With oItem
.To = "(e-mail address removed)"
.Subject = "Revolution"
.Body = "Steve Ballmer takes control on Microsoft!"
.Attachments.Add "d:\abc.txt"
.ReadReceiptRequested = False
.Send
End With
End Sub
How can I translate this code to plain c? I need the datastructures. In
which dlls are this functions?



Regards

Peter
 
D

Dmitry Streblechenko

You will need to use #import in VC++ to import the Outlook type library and
generate the C++ header file.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top