fix mail sending bug

 Attaching the `send_mail_to_admins` function as a class attr of `Pipeline` caused it to become bound, messing up its expected kwargs