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.
Asked
Active
Viewed 45 times
-2
-
You can't. As a general rule, people don't like to be tracked. Email standards are designed to accommodate that. – Dmitry Streblechenko Jul 24 '18 at 14:18
1 Answers
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