Receive mail in Ruby / Rails

How can I get mail in a Ruby on Rails application without having to go through a mail server like PostFix, or get them via pop3, etc.

I needed to catch all the emails sent to @ mydomain.com and just do something with them in my application. I do not need to store mail or anything like that.

Is it possible?

+3
source share
3 answers

I just implemented this for my SAAS to automatically notify me of mail failure messages.

Call me, call me?

. rails . , - ( ). , Rails , . DDOS-. ( .)

, . , -. delayed_job, , cron .

, . - . Ruby net:: imap, .

, .

, /, From. , , - , , . , , , () . ..... oops....

Re:

Ruby on Rails, , PostFix, pop3 ..

, @mydomain.com, - . - .

: , , smtp- dns, . SMTP- " ", .

? , . , - . , , . "". (POP3 IMAP) , .

+2

, (, procmail).

procmail (, - Exchange Server, ), pop3 .

, , .

, , . -, " ", .

0

If you are trying to avoid server polling, consider the IMAP IDLE command. I have successfully written a Ruby client that opens a connection to an IMAP server and receives a server message when new mail arrives.

0
source

Source: https://habr.com/ru/post/1733267/


All Articles