Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
7.2-milestone-3
-
None
-
Unknown
-
Description
The issue is actually that XWiki comes with a default mail configuration that, if used with the mail API, leaves the API client with the impression that the mail is sent when, in fact, it ends up with a failed status.
IMO, the mail sending configuration should have an extra ckeckbox that enables or disables the mail sending API (disabled by default with the default configuration), the interpretation being that an admin explicitly enables the mail API, once he has properly configured it.
If the mail API is disabled when a client (extension) tries to use it, it could immediately fail the send operation and signal the extension (and the user) that the operation can not be executed.
Alternatively, for backwards compatibility maybe, we could not necessarily fail the operation (to not break existing clients), but at least expose some API to query the state of the mail API's configuration (if it's usable or not), so that an extension could know, before using it, if it is in a ready state and properly inform the user, log an error or, more generally, make a decision.