Change "Nothing to do" emails to "Error" emails

English Support for Syncovery on Windows.
Post Reply
Efe_E
Posts: 12
Joined: Tue Mar 29, 2022 8:54 am

Change "Nothing to do" emails to "Error" emails

Post by Efe_E »

We use various Syncovery profiles to move different files across different systems. There are some processes that should ALWAYS have files that need to be moved by Syncovery. If there is a "Nothing to do" email notification, then something has gone very wrong upstream.

I was wondering if there was a way to change the header of the email if it says "Nothing to do" in Syncovery? Or to send another email if a "Nothing to do" email has been sent?

I am currently using Syncovery 9.48n (64 bit)

Kind regards,

tobias
Posts: 1604
Joined: Tue Mar 31, 2020 7:37 pm

Re: Change "Nothing to do" emails to "Error" emails

Post by tobias »

Hello,
yes, please see
https://www.syncovery.com/pascalscript/

Something like

Code: Select all

function OnSendEmail(const ProfileName:UnicodeString;
                    var TheSubject:UnicodeString;
                    var HighImportance,UseDigest:Boolean;
                    var ResultSummary:UnicodeString;
                    const SomethingWasDone,ErrorHasOccurred:Boolean;
                    const FailedPathsCommaText:UnicodeString;
                    const StartedAt,EndedAt:Double;
                    var RecipientsCommaText:UnicodeString;
                    var SenderName:UnicodeString;
                    var SenderEmail:UnicodeString):Boolean;
begin
  if not SomethingWasDone then begin
     TheSubject:='WARNING: '+TheSubject;
     HighImportance:=true;
     UseDigest:=false;
     end;
  Result:=true
  end;

Efe_E
Posts: 12
Joined: Tue Mar 29, 2022 8:54 am

Re: Change "Nothing to do" emails to "Error" emails

Post by Efe_E »

Hi,

Is there anyway we can use the "Execute before / after" option for this? Is there any documentation for passing variables into scripts?

I'm certain that no one in my company would know how to troubleshoot any future issues if I use PascalScript. Generally we use PowerShell, Bash, batch or Python for any scripting required.

tobias
Posts: 1604
Joined: Tue Mar 31, 2020 7:37 pm

Re: Change "Nothing to do" emails to "Error" emails

Post by tobias »

Hello,
your colleagues don't have to troubleshoot this, they can just contact our support.

You could just set up e-mail filters based on "Nothing to do".

But alternatively, you can invoke an external command using Execute before/after, and use the "Variables that can be used in the Execute before/after paths" documented here:
https://www.syncovery.com/variables/

Post Reply