When the smtp password is not saved in the smtp settings dialog kmail prompts for a password just before sending a mail. When debugging the ksmtp component I discovered that an empty password is sent to the server. When I set the smtp password to be stored in the settings dialog, the password is sent correctly to the server and sending mails works again.
Hi, How do you want that it works ? Perhaps I need to disable password lineedit when we don't store password. IT's more logical as it's never stored no ?
Yes it is probably sensible to disable the lineedit in the settings dialog if the store password option is unchecked. In any case if kmail asks the user for a password via the password prompt popping up before sending, it should be used for authentication on the mail server. Otherwise there is no point asking the user for a password, isn't it? This used to work in older versions and just stopped working in the last kmail version.
Git commit 325d0e03480ee756713eccdcffe19a09c44daff2 by Laurent Montel. Committed on 30/08/2018 at 11:49. Pushed by mlaurent into branch 'Applications/18.08'. Disable password lineedit when we don't store password M +14 -1 src/kmailtransport/plugins/smtp/smtpconfigwidget.cpp M +1 -0 src/kmailtransport/plugins/smtp/smtpconfigwidget.h https://commits.kde.org/kmailtransport/325d0e03480ee756713eccdcffe19a09c44daff2
Looking at src/kmailtransport/plugins/smtp/smtpjob.cpp it seems the password from the password dialog is only set to the transport but not to the login job (see line 290). Probably because of the XOAUTH2 handling in line 286.
Git commit 6c0464d203066cddadc9383867d6d585b0e613f4 by Laurent Montel. Committed on 31/08/2018 at 06:46. Pushed by mlaurent into branch 'Applications/18.08'. Fix Bug 398036 - Password for sending mails not used when specified via password prompt Thanks Jan Hambrecht for debugging FIXED-IN: 5.9.1 M +3 -2 src/kmailtransport/plugins/smtp/smtpjob.cpp https://commits.kde.org/kmailtransport/6c0464d203066cddadc9383867d6d585b0e613f4
Note that you also need https://commits.kde.org/kmailtransport/6656ae1449c8743243391d15dca41a912e2aecd3 in case you need to patch it yourself due to a small error that cropped up in the previous commit.
Many thanks and great work!