• An Error Message appears in the 'Run History (Summary)' log document.

    By Harinath Chowdary 1 decade ago

    In the 'Run History (Summary)' log document that is created to log the import details after importing the data, an error message appears in bold red color that says "Error in sending to one or more recipients". Actually the mail notifications are sent out to the recipients successfully and they received the Run History document. But, still the message says that there is an error in sending the notification to the recipients. Could you please look in to the issue and do the needful to fix the issue. I appreciate your help and this is really a great tool for data import. Thanks!!

    • Will investigate

      By David Jeyachandran 1 decade ago

      Thanks Harinath,



      I will investigate this and report back next week. I have had a look at the code and it looking for the specific error of "Recipient not found". This is a tricky one.



      Thanks for reporting this!



      Kind Regards

      David







      EmailLibrary > Function sendEmail(…)


      Const RECIPIENT_NOT_FOUND_ERROR = 4294  <br/>
      


          On Error RECIPIENT_NOT_FOUND_ERROR Resume Next  'If the send fails because the recipient has not been found, just resume. We'll flag this using sendEmail=False.<br/>
      


      'If the recipient is not found, the email is sent to <br/>
      If Err=RECIPIENT_NOT_FOUND_ERROR Then sendEmail = False Else sendEmail = True       
      
      • Have reproduced this problem

        By David Jeyachandran 1 decade ago

        Hi Harinath,



        I have reproduced this problem and so it shouldn't be too hard to fix it.



        Regards

        David

        • Fixed in testing - will be in the next release

          By David Jeyachandran 1 decade ago

          Fixed this one - it was a simple error where I had names a variable isSendError instead of isSendSuccess. So I ended up checking isSendError instead of NOT isSendSuccess. Embarassing error but fixed now and will be included in the next release.



          For now ignore the error or go into the CommonFunctionsLibrary and make the change. This is what the function should look like…

          Function createUsageLog(


          Dim isSendSuccess As Boolean<br/>
          




          'Send Notification if necessary<br/>
          If isAnalysisMode Then<br/>
              If docConfig.Analysis_SendNotificationTX(0)=&quot;YES&quot; Then<br/>
                  Call getEmailConfigValues( docConfig, varSendTo, varCopyTo, strSubject, strBody, isDocLinkToBeSent, True )<br/>
                  isSendSuccess = sendEmail( varSendTo, varCopyTo, strSubject, strBody, docConfig, docLog, isDocLinkToBeSent )<br/>
              End If<br/>
              <br/>
          Else<br/>
              If docConfig.LiveRun_SendNotificationTX(0)=&quot;YES&quot; Then<br/>
                  Call getEmailConfigValues( docConfig, varSendTo, varCopyTo, strSubject, strBody, isDocLinkToBeSent, False )<br/>
                  isSendSuccess = sendEmail( varSendTo, varCopyTo, strSubject, strBody, docConfig, docLog, isDocLinkToBeSent )<br/>
              End If<br/>
              <br/>
          End If<br/>
          <br/>
          If Not isSendSuccess Then strError = strError &amp; Chr$(13) &amp; &quot;Error in sending to one or more recipients. &quot; &amp; Chr$(13) &amp;_<br/>
          &quot;Send To: &quot; &amp; Implode( varSendTo, &quot;,&quot; ) &amp; Chr$(13) &amp; &quot;Copy To: &quot; &amp; Implode( varCopyTo, &quot;,&quot; )<br/>
          <br/>
          Call docLog.ReplaceItemValue( &quot;ErrorsTX&quot;, strError )<br/>
          Call docLog.Save( True, True )<br/>
          Set createUsageLog = docLog<br/>
          <br/>
          

          End Function