Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

9 lines
359 B

namespace :emails do
desc "Resend invitation emails"
task :resend_invitation_emails, %i[] => :environment do |_task, _args|
users = User.where(sign_in_count: 0, active: true)
users.each { |user| ResendInvitationMailer.resend_invitation_email(user).deliver_later }
Rails.logger.info("Sent invitation emails to #{users.count} user.")
end
end