I had a similar problem. My situation was like this: yahoo mail account, google mail account no.1 and google mail account no.2 added to Mac Mail app on MBA2012, OS 10.8
Google mail accounts were fine.
But emails sent from the Mac Mail app using the Yahoo Mail account were not being saved anywhere. Problem was intermittent initially but then it became permanent in the past couple of days.
My problem seems to have been fixed by selecting the Sent folder that appears in the folder list for the Yahoo Mail account and then going to Mailbox -> Use this Mailbox for-> Sent.
Of course, store sent message on the server was already selected but without the step above it was still not storing.
So now messages sent from the Mac Mail client using the Yahoo mail account can be found in the Sent (paper airplane) in Mac mail and in Web Yahoo Mail in the normal Sent folder (so not in a Sent Messages folder that is in the folder list).
Also, to confirm, messages sent from the Mac Mail client using the google mail accounts suffer nothing from action above and will show up in the Web Google accounts as normal in Sent folder.
I'll post back if I notice erratic behaviour with Sent messages but it seems to be working now.
Note1 : Yahoo is set up as IMAP account so it's possible that the above is valid solution for other (non-yahoo) IMAP accounts.
Note2: Yahoo Mail had been working / upgrading their servers in the past few days, including today (it was actually down for a while) so the best idea is to delete the account and add it again to Mac Mail.
I actually deleted all 3 accounts from Mac Mail, quit Mac Mail, restarted Mac, started Mac Mail again, added the accounts, did the change mentioned above and then it worked.
Note3: I also changed the port in the the Edit SMTP Server List to 465 because that's what Yahoo officially recommends for Yahoo Mail but I do not think that has any bearing on the issue of sent mails being lost (possibly makes connection to Yahoo Mail more consistent if Yahoo Mail server only responds on that port)
Note4: Adding INBOX to IMAP Path prefix totally screwed things up for me (possibly because I have more than one account added to Mac Mail) - I wasn't getting any emails.
Note5: I have 2 aliases for the Yahoo Mail account and they are added to Mac Mail app and the fix above works fine for them as well.
Good luck
ag777