Which is faster for getting Mails in Rails: Pop3 / Imap or MySQL Direct Query?
I am rewriting another question because the problem has changed somewhat:
If I want to receive mail from my mail server (another machine) into my Rails application to process it there, which is faster:
- Connect via network / Pop or net / imap to download emails
- Save emails on Mailserver to MySQL database (using something like DBMail) and then connect directly to MySQL database
- Or is there a third option that I don't see yet? Can I let the mail server send Mail in Rails?
Thank you for your advice!
0
a source to share
1 answer
There is not only a third option, but many: you can, for example, connect a mailserver mailbox to your Rails app server. It will then act as a local folder and you can work with your mailboxes directly, which is probably the fastest solution since no IMAP / POP server software will be involved.
And if you're not obsessed with ActiveRecord, you can also use the DataMapper IMAP adapter . But I have no experience with this and don't know if it even works.
+1
a source to share