Right now, there is no way to send one email with multiple exports. Instead, you need to send two emails, each containing a different query.
ArtVandelay::Export
.new(User.where.not(confirmed: nil))
.email_csv(
to: ["george@vandelay_industries.com", "kel_varnsen@vandelay_industries.com"],
from: "noreply@vandelay_industries.com",
subject: "List of confirmed users",
body: "Here's an export of all confirmed users in our database."
)
ArtVandelay::Export
.new(User.where.(confirmed: nil))
.email_csv(
to: ["george@vandelay_industries.com", "kel_varnsen@vandelay_industries.com"],
from: "noreply@vandelay_industries.com",
subject: "List of unconfirmed users",
body: "Here's an export of all unconfirmed users in our database."
)
Right now, there is no way to send one email with multiple exports. Instead, you need to send two emails, each containing a different query.