oOutlookObj = CREATEOBJECT("Outlook.Application") oNamespace = oOutlookObj.GetNamespace("MAPI") oNamespace.logon( , , 1,1) select tomail scan for empty(tomail.sent) newMessage = oOutlookobj.createitem(0) newmessage.recipients.add(tomail.emailadd) newmessage.Subject=alltrim(tomail.subject) * newmessage.Attachments.add('thistest.txt') *- Bodytext=Tomail.body newmessage.body=Bodytext newmessage.send replace tomail.sent with .t., dandtsent with datetime() ENDSCAN rele oOutlookObjHope it helps