I don’t see a DNS entry in the screenshot in the PHP code you have posted?
The weird thing is that the profile message is being set to a newline. Why is that? A message of a length of (I believe) 2 would make the client’s MIME parser go weird.
If anything the $MSG = ''.MSNP_EOL; Just won’t do much, but I don’t know what else to point out in this post.