This has nothing to do with the security on your PC as theus is happening on your yahoo web mail account, which has likely been compromised. You need to contact Yahoo if this is the case.
If you are using an email program to access your Yahoo mail and the sending of messages only happens when the PC is on and connected, then your PC may be infected.
If you are using Windows Live OneCare and you have been infected, but OneCare did not detect or cannot remove the malware, please contact support to report this and for help with removal.
How to reach support (FAQ) - http://social.microsoft.com/Forums/en-US/onecareinstallandactivate/thread/30400b52-7f26-4ba0-bc18-17e305329d90
~ Microsoft MVP Windows Live ~ Windows Live OneCare| Live Mesh|MS Security Essentials Forums Moderator ~