The task is do write an API that allows me to post emails to Gmail, Hotmail, and Yahoo via their webmail interface. The API should use XmlHttpRequest.
More specifically, what you need to do is first identify how to login to these services using XmlHttpRequest. And once the log in is successful, you need to find out how to post the message.
here is how I would approach this:
1) Create a yahoo account
2) Enable firebug or any other HTTP traffic monitoring tool
3) Login into your Yahoo account
4) Analyze the traffic to find out URL and the format of the login post request
5) Use the URL identified in 4) to create the API for Yahoo-login.
6) Do 4) and 5) for sending email
7) Do 1) to 6) for Gmail and Hotmail.
Note: Gmail and Yahoo provide a classic alternative to their normal webmail. The classic version has no Javascript and writing the API for these services should be much simpler. To enable the classic version, just turn off Javascript on your browser.