[Server] Serve the e-mail queue through the database interface (#7858)

This commit is contained in:
BruebachL 2026-11-10 12:16:33 +01:00 • committed by GitHub
parent 9087d0d3fe
commit 526d528e96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 131 additions and 40 deletions

View file

@ -780,6 +780,42 @@ public:
return {};
}
/** @brief One queued activation e-mail, with the address exactly as stored. */
struct PendingActivationMailRecord
{
QString userName;
QString emailAddress;
QString token;
};
/** @brief One queued password-reset e-mail, identified by its queue row. */
struct PendingPasswordResetRecord
{
qint64 rowId = 0;
QString userName;
QString emailAddress;
QString token;
};
/** @brief Fills the queued activation e-mails; false when the query fails. */
virtual bool getPendingActivationMails(QList<PendingActivationMailRecord> & /* mails */)
{
return false;
}
/** @brief Fills the unsent password-reset e-mails; false when the query fails. */
virtual bool getPendingPasswordResets(QList<PendingPasswordResetRecord> & /* resets */)
{
return false;
}
/** @brief Deletes a delivered activation e-mail queue row; false when the statement fails. */
virtual bool deleteActivationEmail(const QString & /* userName */)
{
return false;
}
/** @brief Marks a password-reset queue row as emailed, by row id when known; false on failure. */
virtual bool markPasswordResetEmailDelivered(const QString & /* userName */, qint64 /* rowId */)
{
return false;
}
virtual void clearSessionTables()
{
}