Hi John,
here's some code I use to send email using outlook:
LOCAL loOutlook as Outlook.application
LOCAL loSpace
m.llDisplayEmails = .F.
m.loOutlook = CREATEOBJECT("Outlook.application")
IF TYPE('loOutLook') <> "O" OR ISNULL(loOutlook)
=MESSAGEBOX("Could not load Outlook object.")
RETURN .F.
ENDIF
m.loSpace = m.loOutlook.GetNameSpace("MAPI")
m.loSpace.Logon()
m.loMsg = m.loSpace.GetDefaultFolder(6)
m.loNew = m.loMsg.Items.ADD()
WITH m.loNew
.Recipients.ADD("fred@somewhere.com")
m.lnRecipientCount = 1
.Subject = "Test Message"
.Body = "Body of email"
IF m.llDisplayEmails
.DISPLAY()
ELSE
.SEND()
ENDIF
ENDWITH
Hope it helps.
>I am sending e-mail messages in MS OutLook through Automation and OutLook is placing the messages in the OutBox, I want to know how to force Outlook to actually send the messages as if I clicked the send/receive button.