There is a misconception among Muslims that singing poetry is not allowed or it is haram just like music which is considered haram and prohibited by majority of the scholars.
A similar confused Muslim asked the question to a scholar that whether it is allowed to sing verses of poetry without any music instrument?
Sheikh Saalih answered that poetry is not haram it allowed if the verses of the poem are in praise of Allah and his messengers.
There are plenty of evidences from the sunnah that many companions praised and wrote verses for the messenger of Allah?. Even there are couplets of Aisha (Ra) praising Muhammad (PBUH), similarly Hazrat Ali (Ra) and many other sahaba (Ra) recited poetry during battles which have been narrated from multiple sources.
Scholars also allowed writing & reciting poetry to praise your wife & husband because it increases the love and affection between the family.