FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MAPI OUTLOOK strange fullname attach files
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
MAPI OUTLOOK strange fullname attach files
Posted: Thu Apr 18, 2013 02:28 PM
In Outlook I have this problem
IN OUTLOOK EXPRESS, DAVID INFOCENTER, THUNDERBIRD IT'S OK!

Attach file has this name
C__Usersmarcoboschi.MYFARMDesktopMYFOLDERMYFILENAME.ZIP
instead of
this
C:\Users\marcoboschi.MYFARM\Desktop\MYFOLDER\MYFILENAME.ZIP

Code (fw): Select all Collapse
   cZip1 :=                                 "MYFILENAME.ZIP"
   cZip2 := curdrive() + ":\" + CurDir() + "\MYFILENAME.ZIP"
   lZippato := HB_ZIPFILE( cZip1 , aFiles , 9 )


Source code is this
      DEFINE MAIL oMail                          ;
             SUBJECT "subject"     ;
             TEXT  "text

      AADD( aFileZip , cZip2 )
      oMail:aFiles := aFileZip

      FOR i := 1 TO LEN( aTo )
          AADD( oMail:aRecipients, aTo[ i ] )
      NEXT i
      oMail:lFromUser := .T.
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: MAPI OUTLOOK ...SOLVED
Posted: Fri Apr 19, 2013 06:35 AM

Unlike other programs you must specify exactly Outlook attach files in this way

  oMail:aFiles := { { cZip2 , cZip1 } }

where cZip2 is the name complete of path and cZip1 is a descriptive

Thunderbird, Outlook Express, David infocenter work even IF a Pass in this way

  oMail:aFiles := { cZip2 }

In this las way Outlook creates an attach files like this

C__Users_mb_Desktop_kit_pto_MYFILENAME.ZIP

problem solved with difficulty

:(

Marco Boschi
info@marcoboschi.it

Continue the discussion