Short and simple.
Thanks to you all (except Brian*) for 4 wonderful years and although I am moving on to pastures new I hope we will stay in touch (except Brian*). Hopefully you will all (except Brian*) be able to join me in the Nags Head* at 5pm for farewells and a couple of drinks.
* amend as applicable� If they have bought you a leaving card and gift mention them and how useful (even more use than Brian) the gift will be in your new life/job/role.
�Nothing against anyone called Brian, but in any office there is always �one� and he is usually a Brian.