The "error" you quoted is not an error at all. Those are simply warnings - the fact that $host, $page and $msgid are uninitialized is only a problem if they need to contain certain (initialized) values.
If that was the only warnings you got, and the message was sent, then all is well (at least as regards that particular exercise :-)