I am having trouble detecting an in-firm (EX type) invalid email address of an outlook recipient using the following code:
The invalid email address has a typographical error say, [email protected] for [email protected].
How do I detect an in-firm recipient having an invalid email address?
Dim Email as Outlook.Mailitem
Dim Recipients As Outlook.Recipients
Set Recipients = Email.Recipients
Recipients.Resolveall
If Not Recipients.ResolveAll Then
For i = Recipients.Count To 1 Step -1
If Not Recipients(i).Resolved Then
MsgBox Recipients(i).Name
End If
Next i
End if