Hello,
you can write a method for sending mails and you can call it whenever you want during execution. See my solution: