> >* get a handle to a MAPI session: >oSession = CREATEOBJECT("Mapi.Session") >oSession.Logon("My Profile", .F.) && don't show dialog box > >* create a new message >oMessage = oSession.OutBox.Messages.Add() >* if you need to grab this message later, you'll want >* to save its ID, which will remain constant when >* it moves out of the Outbox: >* oMessage.ID -- put it in a log or something > >* now you have to create a message recipient, >* and tell MAPI it's of "fax type": > >oRecipient = oMessage.Recipients.Add() > >WITH oRecipient > .Name = "MyRecipient" > .Address = "FAX:Whomever@999-9999" > .AddressEntry.Type = "FAX" > .AddressEntry.Address = "Whomever@999-9999" >ENDWITH > >* In this example, you've got the fax number and >* other address information, and you're transfering >* it to the message explicitly. >* It's also possible to give just the name >* and tell Outlook to resolve the address if >* you know that all your recipients are resolvable >* in the existing addressbook. > >* Now add some content: > >oMessage.Text = "here is my file..." >oAttach = oMessage.Attachments.Add() > >WITH oAttach > .Name = <pathed filename> > .Type = 2 && link rather than embed > .Source = <pathed filename> >ENDWITH > >* the following saves the message information >* to the physical message in the message store: > >oMessage.Update() > >* now you can send the message: > >oMessage.Send(.T., .F.) && save a copy, don't show dialog > >>