在Rails中向大量用户发送邮件的最有效方法是什么?

时间:2021-09-22 20:13:17

I'm using ActionMailer, and my current function is as follows:

我正在使用ActionMailer,我当前的功能如下:

  def send_profile_reminder()
    User.all do |user|
      if user.setup_profile == false
        ReminderMailer.send_reminder(user).deliver
      end
    end
  end

Is this the most efficient answer?

这是最有效的答案吗?

1 个解决方案

#1


1  

ActionMailer is good in sending single emails but it leads to trouble while sending for large users. Some of the services like Sendgrid and Mailchimp will help you in sending bulk emails to large number of users.

ActionMailer擅长发送单个电子邮件,但在为大型用户发送时会导致问题。 Sendgrid和Mailchimp等一些服务可以帮助您向大量用户发送批量电子邮件。

#1


1  

ActionMailer is good in sending single emails but it leads to trouble while sending for large users. Some of the services like Sendgrid and Mailchimp will help you in sending bulk emails to large number of users.

ActionMailer擅长发送单个电子邮件,但在为大型用户发送时会导致问题。 Sendgrid和Mailchimp等一些服务可以帮助您向大量用户发送批量电子邮件。