| Author |  | 
      
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Hello, i try to download mail or attachments but i cant find the temporary path where the file mail is store, how can i get it?
           | Posted: 24 March 2016 at 6:17am | IP Logged |   |  
           | 
 |  Regards.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Hi,
           | Posted: 24 March 2016 at 6:51am | IP Logged |   |  
           | 
 |  
 Could you please specify how exactly you try to download mail or attachments – through PHP API or AJAX API or somehow else? Could you provide us some code snippet here?
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          I try to download Mail or attachments with PHP API.
           | Posted: 24 March 2016 at 7:21am | IP Logged |   |  
           | 
 |  I have no code to show because i can't find some function wich allow to download or get mail path
 
 Regards.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Unfortunately, we don't yet have an easy way to get actual attachments through our PHP API. We scheduled the development of this tool for subsequent releases. At the moment you can try to find out a solution by yourself looking through our example in the file libraries/ProjectCore/Actions.php in the "raw" function at line ~6761 (in v7.6.7). You can use directMessageToStream method for that.
           | Posted: 24 March 2016 at 7:28am | IP Logged |   |  
           | 
 |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Thanks for answer, i have already try to make something with these function but i don't understand how to get the "$rResource".
           | Posted: 24 March 2016 at 9:48am | IP Logged |   |  
           | 
 |  
 I also try to use "putFile" to create temporary file of my mail but i have the same problem, i don't know how to get "$rSource".
 
 Regards
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Indeed, it's not easy in this version :( In the future, we'll have more friendly API for that.
           | Posted: 24 March 2016 at 9:53am | IP Logged |   |  
           | 
 |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Hello,
           | Posted: 25 March 2016 at 4:08am | IP Logged |   |  
           | 
 |  I finally found the solution to download mail or/and attachment.
 - First step : include "ActionsBase.php" / "Actions.php" / "Service.php"
 - Second step : call a new instance of Service
 - Third step : create function in Service.php wich call method "AjaxMessagesGetBodies()" of "ProjectCore/Actions.php" to get Hash of message.
 - Finally step : create function in Service.php wich call method "RawDownload()" of "ProjectCore/Actions.php" to launch file download.
 
 I hope this post can help other Webmail Lite Users.
 Regards,
 Delphine.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Thanks!
           | Posted: 25 March 2016 at 4:13am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |