【问题标题】:Why doesn't Gmail let me modify :from field Rails action mailer为什么 Gmail 不让我修改 :from field Rails action mailer
【发布时间】:2016-12-13 10:37:15
【问题描述】:

我有一个简单的预订申请表。当用户提交并创建请求时,包含请求数据的电子邮件将发送给利益相关者之一(我们称她为管理员)。我正在使用免费的 gmail 帐户通过操作邮件发送电子邮件。问题是当客户点击 gmail 中的“回复”按钮时,管理员想要直接回复客户,而不是回复发件人。我尝试像这样编辑 :from 字段,但它没有用。我有哪些选择可以让这成为可能?

def sample_email(sender_email, user_name, booking_id)
    @booking = Booking.find(booking_id)
    mail(to: user_email, subject: "C2Sky booking request##{booking_id} from #{user_name}", from: @booking.email)
  end

【问题讨论】:

    标签: ruby-on-rails ruby email gmail actionmailer


    【解决方案1】:

    mail 调用中传入reply_to: emailaddressforreply@whatever.com

    当任何人现在点击回复时,它将被设置为emailaddressforreply@whatever.com

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-06
      • 1970-01-01
      • 1970-01-01
      • 2011-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-09
      相关资源
      最近更新 更多