Tisamu - 1 year ago 77
Ruby Question

I would like to scrap mails from a MailBox, this is the situation:

It's about a Technical support with a Ticket System.

A client make a demand on the contact form on the website,

Then when the Admin answer to the ticket in the chat, a mail is sent to the Client, everything to there is ok, the problem is that when the client answer to this email, the content of the mail must be scrapped and added to the database to be seen in the Ticket Chat.

So the Idea is that the Client Can follow the progress of his Ticket by mail instead of going to the ticket page.

I've tried MailMan, but that didn't work, the deamon was starting and then crashed after a couple of minutes whitout scrapping anything, I don't use SendGrid but a private SMTP server so I can't use the Grabber gem of this service.

I'm running Rails 5, my DB is in PostGre, and I'm using ActionMailer as mailing system.

I'm running out of ideas about how to make this feature..

I hope my question is clear enough and my English not too bad.

I suggest you to make an email(any popular provider except gmail) box and configure it to use a pop server. To read it from the box use the mail gem.

Mail.defaults do

Then make a daemon to read all income emails and save it to the database, mail gem is just a wrapper around Net::POP3 ruby library and it is super useful for read\receive\parse\build mails.
The ActionMailer here is not a helper for you, it is very handy only for send mails and it does nothing to recieve mail.