Send mails to multiple user using Swoosh?

How can I send emails to multiple user using Swoosh. Seen documentation, but only Bamboo support emails to multiple user. I have following code which gives error, how can I send mails to multiple user.

    company_admins = for admin <- company_admins do

    |> to(company_admins)
    |> from({"#{}", workspace.support_email})
    |> subject(".........")
    |> render_body("candidate_info.html", %{
    |> Mailer.deliver()

Your response will be highly appreciable.

can you post the error?

also render_body is from phoenix_swoosh, do you have that installed?

according to the docs your |> to(company_admins) is correct…

Right things were not getting fetched into the variable company_admins. Thanks for response.

1 Like