Bug #12664
openWt::Mail::Client::send always fails after trying to send to an invalid email address
0%
Description
Trying to send to an invalid email address may result in receiving a SMTP 501 response. Wt spawns the following error message:
Mail.Client: Unexpected response 501
failIfReplyCodeNot
also throws an exception, which is catched by the send
function, but this function closes the socket when catching an exception. As a consequence, all subsequent send messages fail with the following error:
Mail.Client: Can't send message: not connected
Is it necessary to close the connection when a unexpected response is received?
Or can we automatically reconnect?
Or can we expose the connection status (e.g. add a Wt::Client::isConnected
method), in order the caller can at least determine whether is should reconnect?
Or should the caller always assumes the connection is disconnected when sending fails? If so, shouldn't this be documented?
No data to display