>*-this Method creats an email, it attaches the required data >*-progmaticly >select mailtosend > >copy to array paAttchFiles fields name for NOT mailtosend.done && copy file names to an array > >*copy to array paAttchFiles fields mailtosend.done for not mailtosend.done && copy file names to an array >thisform.OLESessionCtrl.Signon && Creat the logon session >with Thisform.OleMessageCtrl > .SessionID = Thisform.OleSessionCtrl.SessionID && get the next ID no > .Compose &&compose an email in memory > .RecipAddress = 'Iain Brodie' && address it to me > .ResolveName && Let system find out the proper address > .msgIndex = -1 && set the Message Index count > .msgsubject = alltrim(pcclientsname) && Put client name as the Subject > .msgnotetext = " Please Put on disk for Lewis Alcraft" && put this in the main body of message > AttachmentDone=1 && Creat a counting varible for the Attachment counter > > *-this for loop counts how many files there are to be attached > *-for each file name there is two files to be attached > for lncount = 1 to alen(paAttchFiles) > .AttachmentIndex = AttachmentDone -1 > .AttachmentPathName = (pcclintspath+'download\'+paAttchFiles(lncount)+'SO.dbf') > .Attachmentposition = AttachmentDone -1 > AttachmentDone=AttachmentDone+1 > endfor > >endwith >*set step on >with thisform.OleMessageCtrl > .send(1) && show predefined email with fields filled in >endwith >*-this part sets the flags on the data, so we do not get duplicate files >select mailtosend >for i = 1 to alen(paAttchFiles) > loca for mailtosend.name=paAttchFiles(i) > replace mailtosend.sentdate with datetime(), mailtosend.done with .T. >endfor >thisform.release >>