|
I have a script which is executed with received emails via mail2script. What is an easy way to extract attachment from the email and save to a file? I could make an assumption that there is always one and only attachment. Thanks, Adam |
|
That depends on the programming language that you are using to parse the email. Our mail2script feature sends the contents of the email as standard input, so you should be able to parse them easily. If you are using python, the email library is the best option. It is very well documented and it has some examples at the end. We don't have mail2scipt related tips in our documentation, so I did a quick search on Google and found a couple of articles that look good as a starting point:
You can probably find some other good choices in these search results. |