r.send_to(“[email protected]”) do |mail|
mail.subject = “Test Report”
mail.attach “test_file.txt”
mail.text = “This is an email with attached txt”
end
Try like
recipients = [“[email protected]”,“[email protected]”,…]
recipients.each do |recipient|
r.send_to(recipient) do |mail|
mail.subject = “Test Report”
mail.attach “test_file.txt”
mail.text = “This is an email with attached txt”
end
end
recipients = [“[email protected]”,“[email protected]”,…]
r.send_to(recipients) do |mail|
mail.subject = “Test Report”
mail.attach “test_file.txt”
mail.text = “This is an email with attached txt”
end