Having looked at this again, the answer $4^5$ is correct for distinguishable letters (and boxes, as Steve Powell has said).
If we have something like form letters (all copies identical - we presume the mailboxes are still distinguishable) , then we do get your answers. I counted them this way:
Five identical letters going into four boxes will leave anywhere from zero to three boxes open.
For no open boxes, there is one more letter than boxes, which can go in one of 4 places.
With one open box, that can be one of 4. One letter goes into each of the three occupied boxes, so we only need to consider arrangements of two "excess" letters among those three boxes. Either the two remaining letters go in one of the three boxes ($\left(\begin{array}{cc}3\\1\end{array}\right) =$ 3 ways), or one letter goes into each of two out of the three boxes ( $\left(\begin{array}{cc}3\\2\end{array}\right) =$3 ways). So this case produces $4 \cdot (3 + 3) = $ 24 arrangements.
Two open boxes can occur in $\left(\begin{array}{cc}4\\2\end{array}\right) =$ 6 ways. There are three "excess" letters to distribute among the two occupied boxes: either all go into one ( $\left(\begin{array}{cc}2\\1\end{array}\right) =$ 2 ways) or two go into one and the remaining third excess letter into the other box (also $\left(\begin{array}{cc}2\\1\end{array}\right) =$ 2 ways). This case produces $6 \cdot (2 + 2) =$ 24 arrangements.
Finally, having three open boxes means that one of 4 possible occupied boxes gets all of the letters.
So, all told, there are only 56 arrangements for the identical letters. (I guess I find partioning easier to check, though having done so, I now see what you are describing in your second case. So distinguishability makes a huge difference in answering this question.)
The first letter can be posted in any of the $2$ post boxes. Therefore, it has $2$ choices.
Similarly, the second, the third, the fourth and the fifth letter can each be posted in any of the $2$ post boxes.
Therefore, the total number of ways the $5$ letters can be posted in $2$ boxes is $\color{red}{ 2\times 2\times 2\times 2\times 2=32}.$
Best Answer
Denote letters in {A, B, C, D} and boxes in {u, v, x, y, z, w}.
In the 2nd way you mentioned:
compared with
They are two identical ways, but counted twice. (Not surprisingly, 1440 divided by 2 gives 720.)