>>PrSenderEmail = &H0C1F001E
>>?sItem.Fields(PrSenderEmail)
>>
>>
>#DEFINE PrSenderEmail 0x0C1F001E >?sItem.Fields(PrSenderEmail)>Note that you can not use #DEFINE in the command window.
>Function SendEMail >Lparameters lcTo, lcSubject, lcBody, lcBCC >Local loOutlook, loNameSpace, loFolder, loItem,loSafeItem,lcCurDir > >If Type('lcBody') != 'C' Or Type('lcSubject') != 'C' Or Type('lcTo') != 'C' > Return .F. >Else > lcCurDir = Sys(5) + Sys(2003) > If Vartype(lcBCC)#'C' > lcBCC='' > Endif > loOutlook = Createobject('Outlook.Application') > loNameSpace = loOutlook.GetNameSpace('MAPI') > loSafeItem = Createobject('redemption.safeMailItem') > loItem = loOutlook.Createitem(0) > With loSafeItem > .Item=loItem > .body=lcBody > .To=lcTo > .bcc=lcBCC > Endwith > With loItem > .SUBJECT = lcSubject > .IMPORTANCE = 1 && 1 = Normal > Endwith > loSafeItem.Send > Cd (lcCurDir) > Release loItem > Release loSafeItem > Release loFolder > Release loNameSpace > Release loOutlook > Release lcCurDir > Return .T. >Endif >Endfunc