cancel
Showing results for 
Search instead for 
Did you mean: 

BluePrismScheduleMonitor send mail error

lulu7712
Level 4
Hello,

I'm currently testing BluePrismScheduleMonitor version 1.0.2, which by the way is version 1.0.1 according to the details 😁

When I try to send an email with the information, I get the following message "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP - Client was not authenticated to send anonymous mail during MAIL FROM"

For testing the smtp object on blueprism using I think as in the BluePrismScheduleMonitor the .net SmtpClient class, we managed to send a mail with the same info.

However we had modified the object code to use the "UseDefaultCredentials" property so that we didn't have to re-enter the password.

I asked our exchange expert about the error and he said "This is normal! The problem is that the application did not authenticate itself before sending the email."

Have you already identified the error?

------------------------------
Ludovic COTTEZ-ABRATE
------------------------------
9 REPLIES 9

Hi Ludovic,

Yes, the SmtpClient class is being used the same way in both the BluePrismScheduleMonitor and the SMTP VBO - which is set up for direct send.

A few questions:
1. Are you using smtp.office365.com as an SMTP server?
2. I presume multi-factor authentication is not enabled for this email account? Or if it is, an App Password is being used instead.
3. Is a full email address being entered in the "Email Username" field? eg. 'user@example.com' instead of just 'user'
4. Is the email recipient address part of another domain? or internal to the same org?

I have read that setting the SmtpClient.UseDefaultCredentials property to false is often all it takes to get it working. Is this how your customized SMTP VBO is configured?


------------------------------
Charles Kovacs
Developer Consultant
Blue Prism
America/Chicago
------------------------------
Charlie Kovacs

Hello,

Thank you for your feedback.

1 : We use our internal smtp host
2 : Without going too far, it doesn't seem to me that
3 : Yes, we have entered a full address
4 : It is an internal address too

To complete, we tested the VBO SMTP object with (if we want to send an email with the email associated with the open session account without entering the password) or without the UseDefaultCredentials with success, we also entered the same info to test in BluePrismScheduleMonitor.

I would say that the particularity is that in the VBO it asks us for a user/password in addition to the "From" parameter, necessary to authenticate with the System.Net.NetworkCredential before sending the email.

I'm not sure what I'm saying because I don't have the source code in front of me but I think it could be an idea.

------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

Hi Ludovic,

I have taken some time to look further into this issue. A proper v1.0.3 release is available for download now: https://digitalexchange.blueprism.com/dx/entry/9648/solution/blue-prism-schedule-monitor

The notification component is refactored so Username and From fields are separate and UseDefaultCredentials is set to false. I wasn't able to recreate the error you are experiencing, but this new solution still passes my existing tests, just can't 100% confirm this is a sure fix for you. Regardless, looking forward to how it works if you give it a try. And to that end, the source code for the Schedule Monitor is also available should you find it necessary to fork - the download link is towards the bottom of the page linked above.

Cheers

------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs

Hello,

Thank you for the correction, it does work now.

Looking at the source code I have a question about the choice to query the "BPAScheduleLog" table based on the "firereason" field.

To test this I ran a schedule with a 2 min occurrence without the resource being run, I can see the errors in the recent activities but in the [BPAScheduleLog] table the entries show me a "firereason" of 0.

However, in the [BPAScheduleLogEntry] table I can see the errors.

Do you know if this is a malfunction?

Thank you for your help,

------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

Hello,

I believe there are two ways in which a schedule might be considered a failure:
  1. The schedule fails to fire at all
  2. The schedule fires but runs into a termination
The Schedule Monitor tool is considering option number 1 - to determine instances where a schedule failed to fire at all. My understanding  is the [BPAScheduleLogEntry] table covers the second option by recording instances where the schedule successfully fired but ran into a termination.

If I follow, it sounds like you are interested in having the Schedule Monitor report both scenarios (misfires and terminations). I think it would be a good idea, I will look into it.


------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs

Hello,

Thank you for your feedback, indeed it explains the reason, for the second case I think it could interest many members 🙂


------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

Hi Ludovic,

I updated the Schedule Monitor recently so that it can detect both types of schedule failures we discussed previously in this thread. This will be version 1.1.0 here on the Digital Exchange if you are interested: https://digitalexchange.blueprism.com/dx/entry/9648/solution/blue-prism-schedule-monitor

------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs

Hi! 
I'm testing new version 1.1.0 and got some troubles. 
After configure connections and smtp setups, run exe and not works. 
When see the log I found this error:

2022-07-03T15:36:42.7513834Z|INFO|Initiating
2022-07-03T15:36:42.7826332Z|INFO|Opening connection to database
2022-07-03T15:36:42.8138849Z|INFO|Database connection opened
2022-07-03T15:36:42.8295107Z|INFO|Querying database for misfired schedules
2022-07-03T15:36:42.8295107Z|FATAL|'STRING_AGG' no es un nombre de función integrada reconocido.
Sintaxis incorrecta cerca de la palabra clave 'as'.
2022-07-03T15:36:42.8295107Z|INFO|---------------------------

This error not ocurrs in 1.0.3, so, there are some setup that I didn't check ? (I realised in 1.0.3 contains a folder with .dll file that 1.1.0 hasn't, may is it the cause?)

Also, although 1.0.3 works fine sending mails, when I scheduled task every 5 minutes, it sends mail with the same result, including fails and error schedule that last mail.

I hope you can helpme to resolve this.

Thanks!

------------------------------
facundo cervin gomez
------------------------------

Hi Facundo,

The query that the Schedule Monitor runs against the Blue Prism database includes a call to the built-in STRING_AGG() function. I see that is only available on SQL Server 2017 or later. I am adding a note to the documentation about that. Do you know what version of SQL Server you are using for your database?

As for the duplicate email issue in v1.0.3, that could be a problem with the Schedule Monitor reading/writing its config file. It is hard to say without seeing the log file. You might try opening the config window and clicking the reset button on the Reset tab. The app uses the config file to remember its previous time-of-query and filters results as to not email the same schedule fail more than once.


------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
Charlie Kovacs