Subject: Farewell and thank you
Dear all,
As some of you know, [Last working day] (to fill in) is my last day at [Company] (to fill in).
Working with you has been one of the best parts of my career so far. Thank you for the help, the advice and the many cups of karak along the way.
Please keep in touch:
All the best,
[Your name] (to fill in)
Send it on your last day or the day before, from your work email, and BCC large lists. Don't criticise anyone; farewell emails get forwarded.