In the "Accounts and Import" settings, you add an account and instead of choosing "Send through GMail (easier to set up)", choose "Send through <example.com>'s SMTP servers".
And then you need to enter the username, server, password, etc for the other account, which can even be another GMail account.