Is there google or yahoo api to send email?
===

I have a PHP web application which needs to send emails 'for' a user through their gmail/yahoo account. We are already storing the user's access tokens for both yahoo and gmail. 

Basically all mail sent from the application should go from the user's yahoo/gmail account and should appear in their "sent mail" folder.

So are there any yahoo or gmail api that will allow me to send end emails using the users access tokens?

I did find this for yahoo: http://developer.yahoo.com/mail/docs/user_guide/SendMessage.html. Is this the right one to use?? Is there a similar api for gmail?