Skip to content

How might we send one email with multiple exports? #30

@stevepolitodesign

Description

@stevepolitodesign

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."
  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions