It says in their FAQ...

POP3: pop.mail.yahoo.com
SMTP: smtp.mail.yahoo.com

You must have been authenticated on the POP3 server before you can send emails via the SMTP server.