msmtp-gnome can get sercrets from Gnome keyring using DBus but a user reported that some permissions were missing [1]. In addition to those, more were added to allow prompting to unlock the keyring if need be.
1: https://bugs.launchpad.net/ubuntu/+source/msmtp/+bug/1875313/comments/7
Signed-off-by: Simon Deziel simon@sdeziel.info