LOCAL oOutLook, oItem, oSafeItem TRY oOutlook = CREATEOBJECT('Outlook.Application') && open outlook oSafeItem = CREATEOBJECT('Redemption.SafeMailItem') && open redemption oItem = oOutlook.createitem(0) && create new mail message oSafeItem.Item = oItem && create safe item object WITH oSafeItem SELECT ReportOut SCAN &&Get To recipients IF &lcEmailRepName = 1 .Recipients.Add(ALLTRIM(Email)) ENDIF &&Get CC Recipients IF &lcEmailRepName = 2 oCCRecpients = .Recipients.Add(ALLTRIM(Email)) oCCRecpients.Type = 2 ENDIF ENDSCAN .Recipients.ResolveAll .subject = This.EmailTitle lcAttachmentNumber = 1 **Check for multiple attachments DO WHILE NOT EMPTY(This.emailattachments[lcAttachmentNumber]) .Attachments.Add(This.emailattachments[lcAttachmentNumber]) lcAttachmentNumber = lcAttachmentNumber + 1 ENDDO *.HTMLBody = lcHTMLString .body = This.Emailbody .Save() .Send() ENDWITH CATCH MESSAGEBOX('Email - ' + This.EmailTitle + ' could not be sent.',64) ENDTRY oOutlook = .NULL. RELEASE oItem RELEASE oOutlook RELEASE oSafeItem