Indy icon indicating copy to clipboard operation
Indy copied to clipboard

Fix for #208 - TIdSMTP - correctly handle answer, if Initial-Response is not supported

Open jaenicke opened this issue 2 months ago • 1 comments

Fix for #208 - If Initial-Response is not supported, the server might fail to handle the request completely or the server might ask for the username, because the server does not handle the provided username after AUTH LOGIN.

At the moment, the login is cancelled at this moment, so it does not work at all.

So I added functionality to answer the request for the username correctly and continue. Note: The encoded string 'Username:' is hardcoded directly in the code at the moment. A constant would be better, but I did not know where to put it correctly.

In addition I added a property CanAttemptIR to TIdSMTP, so one can switch off the try with IR in case the server cannot handle this at all. This was supported already, but the functionality was not exposed, because this parameter was always set to True.

jaenicke avatar Apr 11 '24 08:04 jaenicke