smtp username password

How do you specify a smtp username and password that is *different* from your imap username and password?  My mail is received through gmail, but I want to send mail from a different smtp server.  This is using an account selected for gmail.