user1402147
user1402147

Reputation: 111

receiving email POP3 and save in DB

I would like to continuously retrieve my emails via POP3 in my RoR-Projekt

where and what should I have to set so that the mails are received.

After that I have a table called "messages" with string: "email", string: "subject" and text: "text"

I would like to check if messages.email is the same like sender.of.email and messages.subject is the same like sender.of.email.subject if it is true save email text to messages.text

else delete email

do that work with ActionMailer do i need a gem? how do that all work??

Upvotes: 1

Views: 3231

Answers (3)

user1402147
user1402147

Reputation: 111

i did it wiht Mailman gem.

more infos you can find:

http://dansowter.com/mailman-guide/

i have some other problems with the output/display of a mail but i hope i will fixed it with some help

Upvotes: 0

msharp
msharp

Reputation: 3208

Depending on your version of Rails, you might have mikel's excellent Mail gem. If not you should use it anyway.

Use it to retrieve the messages from you POP3 server, parse the email content and access the properties which you want to work with.

Upvotes: 3

ilanco
ilanco

Reputation: 9957

There is a great project called dbMail for storing emails in a database. Let dbMail handle the emails then process whatever you want with any language that can access the database.

Upvotes: 0

Related Questions