Ignore certain errors for email notifications

General Discussion in English
Post Reply
martman
Posts: 2
Joined: Fri Jan 16, 2026 10:05 am

Ignore certain errors for email notifications

Post by martman »

Good afternoon everyone

Apologies if this has been addressed elsewhere, but I'm having an issue with email notifications being sent for errors that should be ignored.
I have syncovery setup to perform a similar job to OneDrive (can't use OneDrive however) Syncovery works fine, but i get several emails (sometimes several in an hour) a day from Syncovery saying it's encountered an issue with a file/s and gives the error
The resource could not be found
In my profile, I do have error handling set to ignore ALL errors, I only want an email to be sent if Syncovery has an issue running the profile (scheduler error) or my service account that speaks to SharePoint has a login issue.

I did send a support ticket through and was told to check the Error Handling options, which has been done, and emails did seem to stop for a time, but they have started becoming more and more recent.

I would like Syncovery to email a central logging system (rather than myself) but can't enable this if i get multiple emails/day - the email alert should only fire when there is a serious error.

Can any one point me towards a solution to this ?

Thanks :D
tobias
Posts: 2136
Joined: Tue Mar 31, 2020 7:37 pm

Re: Ignore certain errors for email notifications

Post by tobias »

Hello,
you can write your own script to determine which emails you want.

Please see "Send E-Mail Notifications Depending on Profile Results"
on
https://www.syncovery.com/pascalscript/

For example:

Code: Select all

var NeedEmail:Boolean;

function OnProfileResults(const FilesCopiedL2R,FilesCopiedR2L:Integer;
                          const FilesToCopyL2R,FilesToCopyR2L:Integer;
                          const BytesCopiedL2R,BytesCopiedR2L:Int64;
                          const ResultString:UnicodeString;
                          const Error:Boolean):Boolean;
begin
  Result:=true;
  NeedEmail:=Error and (Pos('Error to ignore',ResultString)=0);
  end;

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
  Result:=NeedEmail;
  end;
martman
Posts: 2
Joined: Fri Jan 16, 2026 10:05 am

Re: Ignore certain errors for email notifications

Post by martman »

Thanks tobias

So far that seems to be working as expected :D
Post Reply