Send email when a token or co-owner is added
In the spirit of #1895, it would be good to notify account holders and crate owners on actions that affect authorization status, like adding an API token to their account or adding a co-owner to a crate they own.
Hey @Turbo87 I'm happy to finish this ticket off (by adding the "send an email when a co-owner is added" functionality).
Before I do, in https://github.com/rust-lang/crates.io/pull/9245#discussion_r1712873879 you said:
we could move sending the email to a background job, but that would be yet another query. this is fine as is for now :)
Would you prefer I implement the new co-owner email as a background job? Or inline with the API call like #9245 does for the token email. If background job, I'll open a PR after to do the same for #9245 too after?
Would you prefer I implement the new co-owner email as a background job?
whatever you prefer/is easier. we don't have strong reasons yet to prefer one over the other.