'Famille' is a collective noun, and when used as such, represents a 'thing', not a 'person' or 'people' directly. The noun is treated grammatically as inanimate in this situation, and replacing 'à famille' with 'y' is correct. Effectively you are going to write to 'it', the family as an abstract entity (if writing to members of family as individuals - something like ' aux membres de ma famille ' can be used. (See comments below first link - Chris has covered this well previously in a response there).
By contrast, "mes cousines" does not act as a collective noun, but a plural noun referring directly to a number of individual people. The use of 'y' to replace " à mes cousines " is not grammatically correct - you are writing to them, and leur is the indirect object pronoun needed.
Some plural English nouns are singular in French and vice versa
Using lui/leur = him or her/them (French Indirect Object Pronouns)
Sign in to submit your answer
Don't have an account yet? Join today
Test your French to the CEFR standard