To get a good response from a villager when you send a letter, you need to use real words in the letter. Villagers can tell real words from gibberish. You can repeat the same word up to 8 times, and the villager will consider it to be a good letter. If you exceed eight repetitions, the villager will consider it to be a bad letter. Short words like "a" and "the" don't count.
Villagers don't know word meanings. You can write a mean letter or negative letter and still get a good response. However, I have read that swear words in the letter will get a bad response.
If you include a gift in a well-written letter to your villager, you will get a gift in response. The type of gift that you get depends on the length of the letter.
No; you can attach anything at all to the letter and, as long as your letter was good, the villager will send you a favorable reply. This means that you can send trash, forged paintings, pitfall seeds, and other things that get you little or no money from Tom Nook. This can be a good way to get value out of an item that is otherwise not worth very much. But be careful, because if you send something really valuable, you might regret it if you don't get something quite as valuable in return. Imagine sending a throne, worth 200,000 Bells, to a villager, and getting only a piece of fruit in return! Sometimes you might feel like being that generous, but if you're still paying off your mortgage, you might not want to give away something that valuable.
If you write a letter that your villager thinks is bad or confusing, the villager will send you a bad reply. But if you write a letter that your villager likes, you will get a favorable response. Best of all, if you attach a gift to a good letter and send it to a villager, you will increase your friendship with that villager and get a gift from that villager in return.