If the target system has Outlook98 or Outlook2000 (sorry OutlookExpress will NOT work), you can use Outlook as an automation OLE server. Here are some example:
**************************************************
local loOutLook, loEmailItem, loAttachment, lcFile
loOutlook = createobject('outlook.application')
loEmailItem = loOutlook.CreateItem(0)
loEmailItem.To = "
somebody@somewhere.com"
loEmailItem.CC = "
someoneelse@wheretheyare.com"
loEmailItem.BCC = "
secretperson@guesswhere.com"
loEmailItem.Body = "This is the text body message that I want to send."
loAttachment = loEmailItem.Attachments
lcFile = "c:\MyDocuments\SomeFile.doc"
loAttachment.Add(lcFile)
loEmailItem.Send
loOutlook = .null.
release loOutlook
**************************************************
In this example we 1) create an instance of outlook, 2) tell outlook to create an email item, 3) set the To, CC, BCC, and the message body text, 4) add a file to the email item as an attachment object, and 5) we tell the email item to send itself. Finally, we close out our reference on Outlook and our local variable.
The only problem with this method is that it forces you or your user to have Outlook98/2000. The reason you cannot use OutlookExpress is because it cannot serve as an OLE automation server.
Hope this helps.
Larry Rix