by Marco Turco » Fri Mar 17, 2006 8:22 am
Hi Davide,
unfortunately Microsoft released a fix only for exchange server
and not for Outlook.
The only turnaround I found is to send email via OLE if Outlook is installed
otherwise I use the MAPI subset system.
You can make this using this function:
#include "FiveWin.ch"
#include "Mail.ch"
FUNCTION Interactivemessage()
paramet cSubject, cBody, aTo, aFiles, lDirectSend
LOCAL oOutLook,oMailItem,oRecip,oAttach,i
if lDirectSend=NIL
lDirectSend:=.f.
endif
if cSubject=NIL
cSubject:=""
endif
if cBody=NIL
cBody:=""
endif
if aFiles=NIL
aFiles:=array(0,0)
endif
lOffice:=.t.
TRY
oOutLook := CreateObject( "Outlook.Application" )
oMailItem := oOutLook:CreateItem( 0 )
oRecip := oMailItem:Recipients
CATCH
lOffice:=.f.
END
if lOffice
for i:=1 to len(aTo)
oRecip:Add( aTo[i,2] )
next
oMailItem:Subject := cSubject
oMailItem:Body := cBody
if len(aFiles)>0
oAttach := oMailItem:Attachments
for i:=1 to len(aFiles)
oAttach:Add( aFiles[i,1] )
next
endif
if lDirectSend
oMailItem:Send()
else
oMailItem:display(.t.)
endif
else
for i:=1 to len(aTo)
aTo[i,1]:=alltrim(aTo[i,2])
aTo[i,2]:=alltrim(aTo[i,2])
next
oMail:=tMail():New( cSubject,cBody,,,,, .f., .t.,,aTo,aFiles)
ACTIVATE MAIL oMail
retcode:=oMail:nRetCode
endif
return
Best Regards,
MArco