It’s the nastygram that has gone viral.

An Australian mom thought she was doing a sweet thing for her daughter when she put a slice of chocolate cake in the lunch bag for her child to enjoy at school.

The gesture set off an alarm, of sorts, that flagged the slice of cake as a violation of the school’s healthy foods policy. The cake fell in the dreaded “Red Food Category,” which, according to GoodHousekeeping.com, lists foods "that may contain excess energy (kilojoules), saturated fat, added sugar and/or salt."

Sodas? Deep-fried foods? Don’t even think about it. In Australia, those are on the infamous list, as well.

The mom found out about her errant ways when her child came back with a note from the teacher that was topped with a large sad face and said: “Your child has chocolate slice from the Red Food category today. Please choose healthier options for Kindy.”

(Kindy refers to kindergarten.)

One of the mother's friends, Melinda Tankard Reist, decided to post a photo of the note on her Facebook page and wrote: “My friend (mother of 8 healthy children, what follows relating to no. 7) received this today from her 3 year old's kindy. I told her to put in two slices tomorrow and tell them to get lost.”

The post got hundreds of shares and more than 800 comments.

Angela Taylor, one of those who commented, wrote: “I'm quite sure the mother knows it has sugar ....the mother is NOT in kindergarten .....the teacher is chastising the parent here ! Plus makes the child feel bad ...shame on that teacher 👨‍🏫...it's not every day I am sure.”

Another person, Allan Tyers, wrote: “Perhaps tell them that they breaching our privacy by looking. Quote privacy legislation- no right to judge my lunchbox.”