Added "Add to Contacts" to the message editor window
[modest] / src / modest-ui-dimming-rules.c
index 8faeed5..b15b59e 100644 (file)
@@ -2118,9 +2118,12 @@ modest_ui_dimming_rules_on_add_to_contacts (ModestWindow *win, gpointer user_dat
        if (recipients) {
                GSList *node;
                for (node = recipients; node != NULL; node = g_slist_next (node)) {
-                       if (!modest_address_book_has_address ((const gchar *) node->data)) {
-                               has_recipients_to_add = TRUE;
-                               break;
+                       const gchar *recipient = (const gchar *) node->data;
+                       if (modest_text_utils_validate_recipient (recipient, NULL)) {
+                               if (!modest_address_book_has_address (recipient)) {
+                                       has_recipients_to_add = TRUE;
+                                       break;
+                               }
                        }
                }
                g_slist_foreach (recipients, (GFunc) g_free, NULL);