Receive emails from multiple accounts using mailman gem in rails

643 Views Asked by At

Is there a way to receive email from multiple accounts in mailman gem? Here is my mailman_server.rb which processes mail from a single account

require "rubygems"
require "mailman"

Mailman.config.pop3 = {
   server: 'pop.gmail.com', port: 995, ssl: true,
   username: "[email protected]",
   password: "password"
}

Mailman::Application.run do
default do
  puts message.subject
end
end

I want to receive mails from both [email protected] and [email protected] which I can then process. Is there a way I can open multiple accounts in a single process of mailman?

1

There are 1 best solutions below

0
On
  1. Create 3rd email account
  2. set email forwarding from ([email protected] and [email protected]) to that account
  3. set up mailman )