sw/source/ui/dbui/mmoutputtypepage.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8e467c88d0ba6e70159382676af55b8ef8d65d54
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Apr 5 21:50:30 2022 +0300
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Apr 11 04:00:49 2022 +0200

    Related tdf#148384: do not pause after last email's failure
    
    In this case, SwSendMailDialog::AllMailsSent will keep the dialog open
    anyway, to allow to see the resulting report containing errors.
    
    Change-Id: I351a5da01c3ab50677be1d735b261d8e5516cb43
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132588
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 6453502fa8d3cc83e066c550d8df98facb1f4471)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132605
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 5a7ba198d6b1..dcf17151eca5 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -463,8 +463,8 @@ void SwSendMailDialog::DocumentSent( uno::Reference< 
mail::XMailMessage> const &
                                         bool bResult,
                                         const OUString* pError )
 {
-    //sending should stop on send errors
-    if(pError &&
+    //sending should stop on send errors, except after last error - it will 
stop in AllMailsSent
+    if (pError && m_nSendCount + 1 < m_nExpectedCount &&
         m_pImpl->xMailDispatcher.is() && m_pImpl->xMailDispatcher->isStarted())
     {
         Application::PostUserEvent( LINK( this, SwSendMailDialog,

Reply via email to