I think we should rather use the receiving address to lookup the corresponding identity, and then use the identity's transport method. Reproducible: Always
Thank you for taking the time to file a bug report. The compontent kdepimlibs don't exist anymore since 2011. It was splitted into several parts some moved to Frameworks the other are still under de KDE PIM umbrella. The entire code base went through significant changes. We ported the source code in meanwhile to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2. We welcome you to try out the new 20.08 release and give your feedback.