Currently when setting up a new IMAP/SMTP account, the email address is not always equivalent to the log in credentials. For example, the address may be foo@bar.com but the log in username is just foo.
Currently the account dialog only asks for the email address and uses this for IMAP and SMTP log in. Providing the correct login (e.g. "foo") works for authentication, but then sent emails have an invalid (or non-existent) from address, instead containing only the name of the user.
There needs to be separate inputs for the email address ("identity") and the login credentials.