1

I have a Batch process which sends an email in the finish method.

I tried to check some records that failed via this process and since My JSON contains thousands of records, I decided to replace this JSON with a smaller one - just for those who meed the issue.

Since the process is a little complex I used queuable apex that called a batch based on a custom setting param - and unfortunately I forgot to put this line in a comment.

The result - the queueable apex runs a hundred times and calls the batch which sends the email.

I canceled the apex job immediately but it continued to send the email so I put the email deliverability to "no access".

I checked the "Inbound Email Snapshots" and I see all the pending email to some email I would like to prevent sending it (which it continue to queue ).

I want to delete them all - is there such a thing - Mass Delete of email pending?

any other solution for this?

Thanks!

0

1 Answer 1

1

Without contacting Support, you definitely can't stop those emails from going out, so you're going to get a ton of emails. You'll have to deal with this on your end, either by setting up a rule, manually deleting the records, disabling your email inbox temporarily so they bounce, etc. I'm not sure if Support can do anything either, but nothing you can do in your org will stop those emails from going out.

1
  • Thanks - thank god it on a sandbox but yet - There another person who in this loop. I'll ask him to have a rule in his end to prevent this email received
    – Salvation
    Commented Jul 9, 2020 at 7:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .