A former mail carrier who stole nearly 10,000 pieces of mail intended for residents along her route in Boston in her search for gift cards and cash has avoided jail.

Federal prosecutors say 29-year-old Megan Hawes was sentenced Wednesday to two years of probation and 80 hours of community service after pleading guilty in December to theft of mail matter by a U.S. Postal Service employee.

Prosecutors say she stole the mail between March 2017 and last May meant for residents along her route in Boston's Roslindale neighborhood.

She was caught when she was pulled over for having an expired inspection sticker on her personal car, and police found large amounts of undelivered mail inside.

Her public defender blamed her actions on substance abuse for which she is undergoing treatment.