-2

I have an automation task to validate emails sent to the customer as well as broker and sub-broker, how can I validate each email on the recipient side in the test environment.

MrX
  • 1
  • 1
  • 2

1 Answers1

0

This question is a bit lacking in detail.

If the brokers and subbrokers are real:

You use imap and java, so I assume you use javamail, which includes a suitable mechanism, which your server may or may not support. A username can be specially designated as being permitted to log in to other usernames. So subbroker@example.com can read subbroker's own mail with the normal password, but specialprivilegedusername@example.com can also read subbroker's mail, and authplain() is the way to use that feature.

If supported by the server. Quite often it's not.

If the brokers and subbrokers are in the test environment: Why not just set everyone's password to 1234? Then javamail can access everything, no problem.

arnt
  • 8,949
  • 5
  • 24
  • 32