beam-community / bamboo

Testable, composable, and adapter based Elixir email library for devs that love piping.
https://hex.pm/packages/bamboo
MIT License
1.91k stars 345 forks source link

[Proposal] Add Optional Callback for User, to load existing sent emails. #658

Closed apoorv-2204 closed 1 month ago

apoorv-2204 commented 1 year ago

I would like to purpose a feature , where if dev has existing sent emails, it can be loaded too. Its helpful to debug in dev environment , where there many automated emails, with dynamic content?. As of now, if app goes through shutdown, no sent mails are set.

To achieve this once can set a callback function, to be invoked during the agent start?

image

  def start_link(opts) do
    Agent.start_link(fn ->
      case opts.load_all_sent_mails do
        nil -> []
        fx-> fx.()
      end
    end, name: __MODULE__)
  end
github-actions[bot] commented 1 month ago

This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.

github-actions[bot] commented 1 month ago

Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!