uniq emails when sending epapers!

This commit is contained in:
BoHung Chiu 2022-05-17 12:18:42 +08:00
parent ecdbe51c92
commit bb3236feba
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ namespace :epaper do
email_limit_reciever = site[:site_settings][:email_limit_reciever].to_i rescue 0
mail_limit = email_limit_reciever==0 ? 25 : email_limit_reciever
emails += paper.other_emails_ids
emails.uniq!
emails_valid = emails.select do |email|
tmp = (email_format=~email)
tmp==0 ? true : false