Mail won't send emails

I have four email accounts, all of which are configured on my MacBook's Mail program. I can receive emails for all four but I can't send any - it keeps saying that the server has been rejected. Two of the accounts are gmail, one is hotmail and the final one is yahoo. It's really annoying as I have to open a web browser and log in to each account to respond to my emails! I've tried to change the SMTP server but that hasn't worked at all!! Any suggestions

Has invited:

To reply to a question, please Login or registered