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.