From efabb4fa3d543a1d4443b75a1f23c564ccffd8e2 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Mon, 3 Jan 2022 07:54:56 +0800 Subject: (ui): Enhanced sending email function. 1. make options changeable when init in sending email dialog. --- src/ui/UserInterfaceUtils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/UserInterfaceUtils.cpp') diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index f7f5cb82..967dcc32 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -41,7 +41,7 @@ std::unique_ptr #ifdef SMTP_SUPPORT void send_an_email(QWidget* parent, InfoBoardWidget* info_board, - const QString& text) { + const QString& text, bool attach_signature) { info_board->addOptionalAction(_("Send Encrypted Mail"), [=]() { bool smtp_enabled = false; try { @@ -52,6 +52,8 @@ void send_an_email(QWidget* parent, InfoBoardWidget* info_board, } if (smtp_enabled) { auto dialog = new SendMailDialog(text, parent); + dialog->setContentEncryption(false); + dialog->setAttachSignature(attach_signature); dialog->show(); } else { QMessageBox::warning(nullptr, _("Function Disabled"), -- cgit v1.2.3