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

New commits:
commit 6453502fa8d3cc83e066c550d8df98facb1f4471
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Apr 5 21:50:30 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Apr 5 22:50:30 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>

diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index dca072a0a514..ad0ed9c129fc 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -468,8 +468,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_nProcessedCount + 1 < m_nExpectedCount &&
         m_pImpl->xMailDispatcher.is() && m_pImpl->xMailDispatcher->isStarted())
     {
         Application::PostUserEvent( LINK( this, SwSendMailDialog,

Reply via email to