Consider the set of continuous maps $f$ taking the 2-torus $T^2$ to a manifold $M$, up to homotopy equivalence. Picking a pair of generators of $\pi_1(T^2)$, call them $a$ and $b$, we can map them to elements of $\pi_1(M)$, so the equivalence classes of maps $f$ are at the very least distinguished by elements of $\pi_1(M)^2$.
But additionally, given a point $x$ in $T^2$ and fixing its image $y$ in $M$, for any element $g$ of $\pi_2(M)$ we can pick a representative based at $y$, then find two maps $f$ and $f'$ differing only in a small neighborhood of $x$ such that their images in that neighborhood differ by that representative of $g$. (At least, this is my understanding -- it's just a matter of cut-and-pasting a sphere at the point $y$.) This gives us a set of classes of maps $f$ which are distinguished by elements of $\pi_1(M)^2 \times \pi_2(M)$.
Is this sufficient to characterize the equivalence classes of maps up to homotopy? Or is there something else I'm missing?
More generally, given two (finite-dimensional) manifolds $M_1$ and $M_2$, is all the data necessary to describe the homotopy-equivalence classes of maps $f: M_1 \rightarrow M_2$ encoded in the homotopy groups of $M_1$ and $M_2$, or is more data needed?
Note: I am assuming connected manifolds here.