I need a code that will take a list of X email addresses.
The list will be in format one address per line.
The code has to work in 2 steps.
Step 1. The code will take the list and check regex, for validation of the email. Save the valid emails to a new text file (one email per line)
Step 2. Take the new text file which was saved before and check each email for DNS MX record. IF the MX records are true, will save the email to a new text, if it's not true, it will save it to another txt file.