#DEFINE MAILITEM 0 #DEFINE IMPORTANCELOW 0 #DEFINE IMPORTANCENORMAL 1 #DEFINE IMPORTANCEHIGH 2 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(MAILITEM) WITH oEmailItem .To = "myself@mymailaddress.com;someone@somewhere.com" .Subject = "Sending Email from within Foxpro to multiple recipients and with attachments" .Importance = IMPORTANCENORMAL .Body = "I'm now testing sending to multiple recipients in the .To value from within my app and mulitple attachments too." .Attachments.Add("c:\temp\myfile.txt") .Attachments.Add("C:\temp\junk.txt") .Send ENDWITH RELEASE oEmailItem RELEASE oOutLookObjectYou might want to look at redemption also.
*--Need path to redemption set DEFAULT TO c:\programnotes\redemption *--Send Email oOutlook = GETOBJECT(, "Outlook.Application") oMailItem = oOutlook.CreateItem(0) oSafeMailItem = CREATEOBJECT("Redemption.SafeMailItem") oSafeMailItem.Item = oMailItem oSafeMailItem.Subject = "Test Email with Redemption" oSafeMailItem.Recipients.Add("somebody@somewhere.com") lResolved = oSafeMailItem.Recipients.ResolveAll() lSent = oSafeMailItem.Send()Tracy