Project

General

Profile

Actions

Bug #12664

open

Wt::Mail::Client::send always fails after trying to send to an invalid email address

Added by Dries Mys 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
05/07/2024
Due date:
% Done:

0%

Estimated time:

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

Actions

Also available in: Atom PDF