I am trying to implement facebook like email upload capability to my RoR app. For example we can send an email to some dummy address assigned by facebook per user (for example user can send email to randomname@m.facebook.com) and all the attachments would be uploaded to user's photo albums. I want to be able to develop similar functionality and i were confused with a few options:
I think that how facebook does is create a catch all and catch all the emails to such random address on that particular catch all address. I were wondering if there is a better to send the emails to a catch all address and then parsing the email to which this was sent ? I am using sendmail as a smtp.
Is there are any good RoR Gem that you have used personally to good effect for such a functionality (I can see fetcher here and there on the forums but dont feel good with it).
Thanks in advance.
The trick with catch all address you are talking about is something+random_identifier_here@gmail.com
. Gmail and the default installation of postfix will ignore +
and the string following it and the email will be delivered to something@gmail.com
, but if you fetch the email, you can see the "to" address as something+random_identifier_here@gmail.com
. You can extract the identifier and start from there on.
I am not sure about the gems though, haven't used them.