0

I'm trying to automate a job that is done everyday where someone checks multiple emails that is sent by various inhouse programs/scripts that people wrote. The person doing the checking has to see if there is an email from each source and if it's missing or says error in both cases something is wrong. Otherwise if email is there and doesn't say error then it's good.

I'm trying to wrap my head around how to automate this. I was thinking of checking all the emails with one program and send a aggregate email however since the emails are expected at different times I would still need to send 2-3 of these aggregate email for a person to manual review. I can also make some sort of web app interface that shows the status of each email. Both of these methods can also fail if connection to the email server fails or something.

Is there a better way to automate checking all these emails and also take into account different errors that can happen like not being able to connect to email server etc? This wouldn't be a problem with a person doing it since they would know right away that they can't get into the email.

Details 2 emails has deadline to check at time 1 3 emails has deadline to check at time 2 8 emails has deadline to check at time 3

If an email is missing or contains the "error" word, send appropriate email to correct person to notify.

1 Answer 1

1

Since you already have a person doing the checking at the moment and you also have your dev team.

Discuss with them about,

  1. How many sources are there which generate these emails?

  2. What are the different type of emails each source sends?

  3. Do all emails/sources have a common data format? If not how many variances are there?

  4. Is there a fixed time for the sources to generate these emails? Or are they generated randomly?

  5. Do every source use the same email sender set-up? Same for the recipient of the emails.

  6. Do you have logs of the emails sent and also of error responses in case an email fails to deliver?

  7. There can be more such questions you can come up with.

Once you have an answer to all these, you can then define a flow and accordingly have a plan in place to automate the checking processes.

The implementation of the automate process will then become clear and easy to do.

For example,

Let's say there are 5 different programs/scripts (sources) that send out these emails.

Each use the same sender set-up (From, SMTP, etc) and they send to the same recipient.

Email content used by the 5 sources is similar;

  • Email delivered successfully
  • There is an error -
  • Bounce back email (sent back to sender)

It would be a good idea to maintain logs for these emails and bounce backs.

Each source generates emails at 08:00 UTC, 16:00 UTC, 24:00 UTC (Making it 3 times a day).

No I can write test scripts to execute and check the emails at say 01:00 UTC, 09:00 UTC and 17:00 UTC, to check if the emails have been received in the recipient's mail-box and what is the content of it. Then, check logs for any bounce back errors.

Based of the checks generate an a report and send it to concerned people.

2
  • So your saying just generate log file and have someone check that instead of sending aggregate email? What is the interface for the user for my automated script?
    – Lightsout
    Dec 3, 2021 at 18:06
  • 1
    Well you can check more than log file and also send out an aggregate report email. That is where the first 3 questions would help. You first need to understand your requirements properly. What are you checking currently? How are you doing it? Identify the common patterns and repeated steps that you can automate. I don't know your system so can't pin point the exact interface. Once you understand the requirement properly you will be able to make an educated decision on it. Also you can take help from your technical team, devs, BAs, Project Manager to understand possible path to implement it. Dec 4, 2021 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.