@Andres - Judging by some of your code, it would appear that you've already found this (the authentication has been tested and works)??
@Xzider - Hotmail/Yahoo aren't SMTP servers, AFAIR they use the webDAV HTTP extension.
@Xzider - Hotmail/Yahoo aren't SMTP servers, AFAIR they use the webDAV HTTP extension.