message/contact: ensure valid email address in cache

Filter out the (rare but existent) invalid email addresses from the
cache; use the new method Contact::has_valid_email for that.
This commit is contained in:
Dirk-Jan C. Binnema
2022-12-29 19:03:21 +02:00
parent 5187d9eaa5
commit 2229e2e77e
4 changed files with 75 additions and 10 deletions

View File

@ -53,6 +53,8 @@ public:
/**
* Add a contact
*
* Invalid email address are not cached (but we log a warning)
*
* @param contact a Contact object
*
*/
@ -65,6 +67,8 @@ public:
* if any of the contacts matches one of the personal addresses,
* any of the senders/recipients are considered "personal"
*
* Invalid email address are not cached (but we log a warning)
*
* @param contacts a Contact object sequence
* @param is_personal receives true if any of the contacts was personal;
* false otherwise
@ -75,7 +79,6 @@ public:
add(std::move(contacts), _ignore);
}
/**
* Clear all contacts
*