Reputation: 328
I'm working with actionmailer. I'm trying to send a mail from email_idA
to email_idB
, then fetch that email from email_idB
, and do some string operations on it to look for specific keywords.
I understood how to send the email. But how do I receive that email from email_idB
's inbox? What configurations do I need to do? And how do I extract the email body as plain text?
Upvotes: 0
Views: 1012
Reputation: 1690
Did you mean fetch or receive ? Your question uses both these terms and not sure what you mean.
If you just want to do a keyword search on the mails you sent, why not store the outgoing mail in DB and do the search ? (as you said "somehow fetch that email")
To be able to receive emails in your rails app, you would need to implement the receive
method in your mailer. Follow this link - link
If you meant fetching emails from your inbox then you have to use POP3. Follow this SO answer - link
Im not sure whats your requirement but I'm sure you will find the above links useful :)
Upvotes: 3