Question

How can I extract extract emails and attachments using an API from a SMTP (Mail) server?

I was trying to figure out how Posterous worked. I found this open source project but it had no source code.

https://code.google.com/p/os-posterous/
Was it helpful?

Solution

The scope of your question is a little too broad, but yes, there are many APIs available for extracting email content and attachments. It is actually pretty simple to do in most programming languages (though javascript has nothing to do with this). You could look at MailGun, AWS Simple Mail just to name a couple or you could roll your own. You don't need to create an SMTP server for this, just access an email address programmatically, scan the contents of new messages and perform some logic on the content/attachments/etc.

OTHER TIPS

For Posterous I wrote a service in Java which connected to a mail server over IMAP and parsed incoming emails, attachments, etc. The JavaMail framework makes it super simple to do this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top