It is probably important to note that mu4e doesn't have any direct
relationship with smtp (or imap/pop for that matter). This is all
handled by other libraries (ie. smtpmail for smtp) or applications
(i.e. mbsync for imap). This means you need to look at the
documentation/manuals for whatever package your using i.e. smtpmail and
not the mu4e documentation in order to get the finer details.
With respect to the OPs question about how mu4e selects which smtp
configuration to sue, this is handled in the configuration of your mu4e
'contexts'. For example, I have the following
(add-to-list 'mu4e-contexts
(make-mu4e-context
:name "Outlook"
:vars '((user-mail-address . "
XXX...@hotmail.com")
(user-full-name . "XXXXXXXXX")
(mu4e-drafts-folder . "/outlook/Drafts")
(mu4e-sent-folder . "/outlook/Sent")
(mu4e-trash-folder . "/outlook/Deleted")
(mu4e-refile-folder . "/outlook/Archive")
(mu4e-maildir-shortcuts . (("/outlook/INBOX" . ?i)
("/outlook/Sent" . ?s)
("/outlook/Archive" . ?a)
("/outlook/Drafts" . ?d)))
(smtpmail-smtp-server . "
smtp-mail.outlook.com")
(smtpmail-smtp-service . 587)
(mu4e-sent-messages-behavior . delete))))
(add-to-list 'mu4e-contexts
(make-mu4e-context
:name "Private"
:vars
'((user-mail-address . "
XXXXX...@gmail.com")
(user-full-name . "XXXXXXXXX")
(mu4e-drafts-folder . "/gmail/[Gmail]/Drafts")
(mu4e-sent-folder . "/gmail/[Gmail]/Sent Mail")
(mu4e-trash-folder . "/gmail/[Gmail]/Bin")
(mu4e-refile-folder . "/gmail/Refile")
(mu4e-maildir-shortcuts . (("/gmail/INBOX" . ?i)
("/gmail/Refile" . ?r)
("/gmail/[Gmail]/Drafts" . ?d)
("/gmail/10 - Tech/software/org" . ?g)
("/gmail/10 - Tech/software/gnu" . ?e)
("/gmail/10 - Tech/software/emacspeak" . ?p)))
(smtpmail-smtp-server . "
smtp.gmail.com")
(smtpmail-smtp-service . 587)
(mu4e-sent-messages-behavior . delete))))
Note that I've removed some of the additional features available when
defining contgexts (such as defining functions to be run when you
enter/leave a context or a function to select the context based on
message header args etc. Check the manual for full details.
The key point is note the way you can set variables as part of the
context - in particular, the smtpmail-* variables used to control the
smtpmail process.
I also have appropriate lines for these two smtp servers in my
.authinfo.gpg file, which also includes the username/password required
to do the smtp authentication needed before being able to use the remote
smtp server. I don't have any locally configured smtp server.
See the emacs manual for smtpmail and the auth sources section for info
on using .authinfo.gpg