the image of $1$ by a homomorphism between unitary rings
As you correctly proved, it's true when $S$ is an integral domain.
Another fact is that if the homomorphism is surjective, then $\phi(1_R)$ is the identity in $S$, regardless of what $S$ is like. To prove it just check what it does to any other element of $S$.
Also true: if $R$ and $S$ are non-trivial rings, $S$ has an identity $1_S$, $\phi$ is injective and $1_S$ is in $\phi(R)$ then $R$ has an identity and $\phi(1_R)=1_S$.