Sounds like your dispenser tray ... or the pipe leadind away from it to the drum is blocked. Detergent is the possible cause.
I've got a link here which tells you how to deal with a smelly washing machine ... Google "espares.co.uk/advice/washing-machines/a/7/1182/smelly-washing-machine.html"
You can see how mould builds up ... but the clue is in lower temperatures, and things not disolving.
If you remove the top cover of the machine, you can gain access to the hose that links the dispenser tray to the drum.
Remove it and clean it out ...
I'm sure that your problem lies here.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!