******************************************************************** * Description.......: MailWithGroupWise * Calling Samples...: MailWithGroupWise('nnosonov@thewarrengroup.com','SUBJECT HERE','TEXT MESSAGE HERE ','O:\REDP\OUTPUT\CUstomer\Fares\Trwc0122.zip') * Parameter List....: cSendTo,cSubject,cMessage,cAttachment * Created by........: Robert Peirce * Modified by.......: ******************************************************************** lparameters cSendTo,cSubject,cMessage,cAttachment oGW=createobject('NovellGroupwareSession') if vartype(oGW)='O' && Group Wise object was successfully created local oMsg, loRecipients, lnRecipients, lnI oMsg=oGW.Login.RootFolder.messages.add oMsg.Subject=m.cSubject oMsg.BodyText=m.cMessage oMsg.Attachments.add(m.cAttachment) lnRecipients=alines(laRecipients,strtran(m.cSendTo,";",chr(13))) for lnI=1 to m.lnRecipients cSendTo=laRecipients[m.lnI] if '@' $ m.cSendTo loRecipients=oMsg.Recipients.add(m.cSendTo,'NGW','0') else loRecipients=oMsg.Recipients.AddByDisplayName(m.cSendTo) endif loRecipients.Resolve() endfor oMsg.send release oGW else return SendMails(,,m.cSendTo,m.cSubject,m.cMessage,m.cAttachment) endif>
>>>PROCEDURE GW >>> LPARAMETERS cSendTo,cSubject,cMessage,cAttachment >>> oGW=CREATEOBJECT('NovellGroupwareSession') >>> oMsg=oGW.Login.RootFolder.Messages.Add >>> oMsg.Subject=cSubject >>> oMsg.BodyText=cMessage >>> oMsg.Attachments.Add(cAttachment) >>> oMsg.Recipients.Add(cSendTo,'NGW','0') >>> oMsg.Send >>> RELEASE oGW>>>