Mail uses the SMTP server of the current account that is selected (i.e. Let's say you have three accounts - Home, Work and Play and each has its own SMTP server setup. If you have a message selected in your In box that is associated with your "Home" account, when you go to compose a new message it will use that SMTP server).