I need a macro which can match domain name of the email ids in TO and CC from a list of emails(preferably from excel) and if any of the email address does not match, it should throw a pop-up asking if the user wants to continue and if yes then the mail should be sent as it is and a email id should be added in BCC.
Please find the sample code, it works but I also want to compare the domain name as a sub-string in the subject.
Ex: The if the subject line is "ABC Report- Company1- Jan-2 and it is sent to a1attheratecompany1.com, a2attheratecompay2.com then it should prompt that the a2attheratecompany2.com is an unauthorized email and ask if still the user want to proceed, if Yes it should copy adminattheratemycompany.com in BCC and delay the mail by 5mins.
Bookmarks