Add button for sending test email

This allows for easily testing whether the provided email configuration is correct.

PR #20488.
This commit is contained in:
Thomas Piccirello
2023-12-26 10:54:26 -08:00
committed by Chocobo1
parent 1702b6c891
commit c06817f4eb
9 changed files with 67 additions and 1 deletions

View File

@@ -707,6 +707,11 @@ void OptionsDialog::loadDownloadsTabOptions()
connect(m_ui->groupMailNotifAuth, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->mailNotifUsername, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
connect(m_ui->mailNotifPassword, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
connect(m_ui->sendTestEmail, &QPushButton::clicked, this, [this]
{
app()->sendTestEmail();
QMessageBox::information(this, tr("Test email"), tr("Attempted to send email. Check your inbox to confirm success"));
});
connect(m_ui->groupBoxRunOnAdded, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->lineEditRunOnAdded, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);

View File

@@ -1566,6 +1566,19 @@ readme[0-9].txt: filter 'readme1.txt', 'readme2.txt' but not 'readme10.txt'.</st
</layout>
</widget>
</item>
<item>
<widget class="QPushButton" name="sendTestEmail">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Send test email</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -3935,6 +3948,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
<tabstop>groupMailNotifAuth</tabstop>
<tabstop>mailNotifUsername</tabstop>
<tabstop>mailNotifPassword</tabstop>
<tabstop>sendTestEmail</tabstop>
<tabstop>checkSmtpSSL</tabstop>
<tabstop>lineEditRunOnAdded</tabstop>
<tabstop>lineEditRunOnFinished</tabstop>