0
如何检查电子邮件已经排队,进出口使用活动作业:的Rails:如何检查是否电子邮件已经排队
ofert_approved_notifier = Notifier.ofert_approved(@ofert.user, @ofert)
if ofert_approved_notifier.deliver_later(wait: 1.hour)
puts "Email ofert_approved sent successfully"
else
puts "Email ofert_approved could not be sent"
end
正如你可以在上面看到,林发送电子邮件至@ofert.user
,它在发送前1小时被延迟,上述代码在控制器操作中,我想检查电子邮件是否已经入队@ofert.user
,如果它已经在队列中,我不想将同一电子邮件发送给同一用户。
有没有一种方法可以检查?谢谢