-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add button for sending test email #20194
Conversation
src/gui/optionsdialog.cpp
Outdated
connect(m_ui->sendTestEmail, &QPushButton::clicked, this, [this] | ||
{ | ||
app()->sendTestEmail(); | ||
QMessageBox::information(this, tr("Test email"), tr("Email has been sent")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Email has been sent
Misleading to show this even when it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. I wanted to provide some confirmation to the user, since the interaction feels indeterminant without it. But the smtp code runs async, so we don't yet know if the message will send successfully. Maybe the message should be altered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the message should be altered?
Perhaps you could squeeze an attempted
into the notification?
Email sending has been attempted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the message should be altered?
"An attempt to send an email has been made"?
I don't have a good suggestion...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with "Attempted to send email. Check your inbox to confirm success".
This allows for easily testing whether the provided email configuration is correct.
bf7fc39
to
1c86594
Compare
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")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be any punctuation mark at the end of the second sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking at other messages, no. They generally omit punctuation entirely, and in the case there are multiple sentences, the last omits punctuation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking at other messages, no. They generally omit punctuation entirely, and in the case there are multiple sentences, the last omits punctuation.
Is it a good idea to follow the existing incorrect things?
Well, I'm not insisting. They all can be fixed later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, that conflicts should be resolved before it can be merged.
url: 'api/v2/app/sendTestEmail', | ||
method: 'post', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended to be POST
method only? If so, please add entry here:
qBittorrent/src/webui/webapplication.h
Lines 154 to 155 in dc501c3
{{u"app"_s, u"setPreferences"_s}, Http::METHOD_POST}, | |
{{u"app"_s, u"shutdown"_s}, Http::METHOD_POST}, |
There are merge conflicts and some other required changes. I'll handle them in PR #20488. @Piccirello |
This allows for easily testing whether the provided email configuration is correct. Testing otherwise requires downloading a torrent until completion.
Note that the email is sent using the values currently saved to the config file; NOT necessarily the information currently entered into the options dialog. I'm open to ideas on how to make this more apparent to the user.