class YourMailer < ActionMailer::Base
after_action :check_email_delivery, only: [:your_action]
def your_action
# Your email generation code
end
private
def check_email_delivery
# Implement your custom logic to check email delivery status here
# You can use SMTP libraries or services to verify the delivery
# For example, you can use the `smtp_mail` gem to check delivery status
# Update your database or perform other actions based on the delivery status
end
end
1条答案
按热度按时间blpfk2vs1#
可以使用
after_action
请检查以下示例: