diff options
author | Saturneric <[email protected]> | 2022-01-05 11:26:11 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-05 11:26:32 +0000 |
commit | d6cff150186eb85ef02bbac081ef4c14d3101b52 (patch) | |
tree | 63f3913550b614729608cfbd6f30e3b93b8f05a9 /src/ui/smtp/SendMailDialog.cpp | |
parent | <docs>(document): sync the document. (diff) | |
download | GpgFrontend-d6cff150186eb85ef02bbac081ef4c14d3101b52.tar.gz GpgFrontend-d6cff150186eb85ef02bbac081ef4c14d3101b52.zip |
<fix, feature>(ui): let send mail meet with rfc3156.
Diffstat (limited to '')
-rw-r--r-- | src/ui/smtp/SendMailDialog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/smtp/SendMailDialog.cpp b/src/ui/smtp/SendMailDialog.cpp index ec75af44..3f0b87cd 100644 --- a/src/ui/smtp/SendMailDialog.cpp +++ b/src/ui/smtp/SendMailDialog.cpp @@ -245,7 +245,7 @@ void SendMailDialog::slotConfirm() { thread->addTextContent(ui->textEdit->toPlainText()); if (ui->contentEncryptCheckBox->checkState() == Qt::Checked) { - if (recipients_key_ids_ == nullptr) { + if (recipients_key_ids_ == nullptr || recipients_key_ids_->empty()) { QMessageBox::critical( this, _("Forbidden"), _("You have checked the encrypted email content, but you have not " @@ -414,6 +414,12 @@ void SendMailDialog::slotTestSMTPConnectionResult(const QString& result) { QMessageBox::information( this, _("Success"), _("Succeed in sending the message to the SMTP Server")); + } else if (result == "Fail to encrypt with gpg keys") { + QMessageBox::critical( + this, _("Encryption Error"), + _("An error occurred while encrypting the content of the email. This " + "may be because you did not complete some operations during Gnupg " + "encryption.")); } else { QMessageBox::critical(this, _("Fail"), _("Unknown error.")); } |