使用 rails 中的 mailman gem 从多个帐户接收电子邮件 [英] Receive emails from multiple accounts using mailman gem in rails

查看:47
本文介绍了使用 rails 中的 mailman gem 从多个帐户接收电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 mailman gem 中接收来自多个帐户的电子邮件?这是我的 mailman_server.rb,它处理来自单个帐户的邮件

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@gmail.com",
   password: "password"
}

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

我想同时接收来自 email1@gmail.com 和 email2@gmail.com 的邮件,然后我可以处理这些邮件.有没有什么办法可以在一个mailman进程中开多个账户?

I want to receive mails from both email1@gmail.com and email2@gmail.com which I can then process. Is there a way I can open multiple accounts in a single process of mailman?

推荐答案

  1. 创建第三个电子邮件帐户
  2. 设置从(email1@gmail.com 和 email2@gmail.com)到该帐户的电子邮件转发
  3. 设置邮递员)

这篇关于使用 rails 中的 mailman gem 从多个帐户接收电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆