问题
I have a need to poll a mail server and then extract a photo that is either embedded or attached to the email message.
The goal is to extract the photo and save it to a disk file. The desired functionality is much like emailing a photo from your phone to Twitter, Flickr, etc.
Any insights/advice appreciated.
Thanks
回答1:
If you are polling via POP3 then link text will be useful.
Any way, there is the System.Net.Mail.MailMessage class. It has Attachments property at least.
回答2:
I have used this in the past: Dart Power TCP. It is NOT a free product but it works well. I was able to check and parse POP email messages without too much trouble. I think you could grab email attachments and/or get image URLs out of HTML emails with this tool.
来源:https://stackoverflow.com/questions/2256568/how-to-extract-photos-from-email