Elaine Barrett, 52, pocketed money from 49 people's accounts at Nationwide Building Society in Glasgow's Cambridge Street to fund her online roulette gambling habit.
When someone went to the branch to close their account and move the money to another account, she would give them a receipt with a note of their money and transfer the cash to a made-up account.
She was snared when a hand-written cheque for £9229 transferring money from a woman's account that was closed, to a fictitious account was spotted.
The mother-of-four, of Hill Street, Ardrossan, Ayrshire, pled guilty at Glasgow Sheriff Court to embezzling £300,000 between January 2008 and January 2010.
Passing sentence yesterday, sheriff Bill Totten told her there was no alternative sentence to custody. He said: "You pled guilty to a crime which represents a lengthy and serious fraud. It was a serious breach of trust and a large amount of money was involved."
The court was told the offence was noticed by a member of the branch's cheque adjustment team who was in place to spot cheques that did not have corresponding credit from customers at the society.
Procurator fiscal depute Ruth Ross-Davie said: "On December 23, 2009, she noticed a hand- written corporate cheque for the sum of £9229.84.
"She returned that cheque and made contact with the branch to inquire why it had been processed, being processed resulted in the building society being out of pocket."
The branch was unable to give an explanation and it was noticed the name of the account the money was transferred out of had no funds in it.
When the person was contacted they said they had no knowledge of the cheque and confirmed she had earlier closed an account with the same amount of money in it with a view to opening another type of account.
Barrett was the cashier that dealt with the customer and when investigated it came to light she had embezzled the money. It was found a number of customers served by Barrett had faced similar irregularities.
Ms Ross-Davie added: "She was also able to get away with this because she had set up the transaction when a customer would approach with a view to closing their account and transfer money in to a longer-term savings account.
"The customer would then not be inclined to check that account very regularly."
The court heard that after the building society paid back the money to their customers they were left with a shortfall of £300,000.
The probe also found Barrett's account was linked to an online gambling site and money had been transferred to that.
Her defence advocate, James Irvine, said her scheme was "not particularly sophisticated".
He added: "There are a number of factors that occurred around 2007." He said these included her husband's licensing business collapsing and their house being repossessed, her father dying and discovering her husband was having an affair.
Contextual targeting label: