This area of the website is no longer being updated.
Changes and news are now published on this page.

How to save email attachments in unique folders and update a database with their path

February 25, 2014
1 The save attachments action replaces the existing file if another one with the same name is found. This may be an advantage for some set ups but if you process email attachments that come from different senders this is probably something you don’t like. For example, the file photo.jpg attached in an email from and the file photo.jpg from must be separately processed because they are indeed different photos. We do not want Eva to replace the photo previously sent by John.   To solve this issue the most simple way is to create a different folder for each sender and save the attached file there. The left panel configuration you see on the top of this blog post briefly shows how to do it. This is step-by-step what is done: 1.- Download all the new emails from 2.- Remove from the sender address any characters that may not be suitable for a folder name. These characters are: /|<>:?*. The sender email address probably will not contain any of them but just in case it happens we filter them. 3.- Then we create a folder with the email address name. If the folder already exists it is not a problem. The process will continue normally. 4.- We save the attachments of the email to the created folder. 5.- And finally, for each attached file in an email, we will create a database row containing the sender address and the file path. This database operation will fire the processing of the file but this is not something that Email Parser does in this example. The result looks like this: attachments_emal If you need more details of the specific configuration of each item of the left panel here are the screenshot for your reference: 6 Removing invalid characters from the email address     3Creating a new folder for the attached files   2Saving the attachments from a received email       4Repeat the following actions from each value at the attachment field     5Updating the database with the attached file path      

© 2008-2024 Triple Click Software
News & Updates

Privacy Policy & Terms of Use
PAD fileยทOld news