Source Mail
Smart Features
One way to find the Identity to suggest is to check the existing mail message, on which your new one is based. Obviously this will not work if you are creating a completely new message, but you can find out which identity you used before, if you are replying on another mail or editing a draft. This is done by checking the headers of your existing mail message to which you are replying. All related features are called "Smart" features [1].
Smart Draft
If you prefer to edit Drafts and Templates or stored mails as new mails and they contain virtual Identities, then activate this feature. Sometimes this feature causes trouble: a typical sign is that a recipient's identity is used as your identity. Deactivate (and write a ticket) if you have this problem. [default on]
Smart Reply
If you would like to answer with the same identity as the one you retrieved the mail with (i.e. the recipient address) by reply or forward, then activate Smart Reply [default on]. It should work with all the default settings, but a perfect setup is highly dependent on your mail-server configuration. Check and understand all the other options here and you will have fun with Smart Reply.
Smart Reply has to know if your mail was retrieved (you are the recipient) or it was composed by you. Because you can store both types of mails in the same folders and do a reply on both of them, the situation becomes tricky. Replying on any sent mail is more like editing a draft - and should be handled like that.
If all your received mails contain some received-headers, detection of mail-type [this term needs to be defined as it is unclear whether this is the MIME type or something else such as whether the mail originated by you] will be based on that [default on]. If your received mails do not contain any received headers, deactivate this switch - detection of mail-type will than be done by the folder the mail is located in. Alternatively you can disable "Smart Draft", but this will take you any chance to save your mails with the right identity.
You might like to use Smart Reply if you are going to answer news-posts. This is possible, but will be cause a lot of trouble if not configured the right way. Please activate this feature only if you are knowing what you are doing - it is [off by default].
[1] The other way is to store the used Identity while sending and reuse it - check Storage for that feature.