Ask A Question

Notifications

You’re not receiving notifications from this thread.

Receiving incoming emails

Aqib hameed asked in Rails

I want to develop a software which has multiple emails against the brands, e.g Brand1 has email email1@gmail.com, email2@gmail.com, and Brand2 has emails email3@gmail.com, email4@gmail.com. So Customer send their query by email on email1@gmail.com etc. So system reads all emails against the brands on which customers send their emails.So which Gem is best in rails to reads the emails from multiple mailing box without forwarding the emails???

Reply

Not 100% sure if this is what you're after, but to receive/parse emails, https://rubygems.org/gems/griddler is possibly your best choice.

Reply

But griddler supported email service options are sendgrid (the default), cloudmailin, postmark, mandrill and mailgun.These email service option are paid.But i want to read the email without using email service options just like Mailman, But Mailman canot read emails from multiple mailing box.

Reply

Depends on who your email provider is you can turn on imap and get emails in your app

Reply

Right now i am using mailman and it configuration
Mailman.config.pop3 = {
server: 'pop.gmail.com', port: 995, ssl: true,
username: 'USER-EMAIL',

password: 'USER-PASSWORD'
}
Mailman::Application.run do
default do
puts "Email receive"
end
end
its work fine to read email only single account, but i face an issue how to reads email from multiple email account ???e.g email1@gmail.com,email2@gmail.com etc (e

Reply

Your use case isn't quite clear to me, but I achieve this in my app by using Outlook / Gmail API to create a subscription against an e-mail account, which generates a webhook. The webhook then notifies my app when the mailbox is updated, and I parse the new e-mail and determine if the contents should be saved to the system. Most companies use either Outlook / Gmail, and they built these webhooks to eliminate the need for IMAP.

Reply

The idea is super, but the implementation will be very time consuming

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.