diff options
Diffstat (limited to 'src/mail.c')
-rw-r--r-- | src/mail.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -498,7 +498,7 @@ get_uploader_email (struct uploader_info *info, struct file_triplet *trp, } mu_address_t -get_recipient (struct access_method *method, struct file_triplet *trp, +get_recipient (struct dictionary *dict, struct file_triplet *trp, const char **errp) { unsigned nrows, ncols, i; @@ -507,32 +507,32 @@ get_recipient (struct access_method *method, struct file_triplet *trp, int rc; void *md; - if (method->type == method_none) + if (dict->type == dictionary_none) { - *errp = N_("access method is not configured"); + *errp = N_("dictionary is not configured"); return NULL; } - md = method_open (method); + md = dictionary_open (dict); if (!md) { - *errp = N_("failed to open access method"); + *errp = N_("failed to open dictionary"); return NULL; } - text = triplet_expand_method_query (method, md, trp); + text = triplet_expand_dictionary_query (dict, md, trp); - rc = method_run (method, md, text); + rc = dictionary_lookup (dict, md, text); free (text); if (rc) { *errp = N_("cannot obtain recipient emails"); - method_close (method, md); + dictionary_close (dict, md); return NULL; } - nrows = method_num_rows (method); - ncols = method_num_cols (method); + nrows = dictionary_num_rows (dict); + ncols = dictionary_num_cols (dict); if (nrows == 0) { @@ -543,19 +543,19 @@ get_recipient (struct access_method *method, struct file_triplet *trp, for (i = 0; i < nrows; i++) { mu_address_t addr; - const char *str = method_result (method, md, i, 0); + const char *str = dictionary_result (dict, md, i, 0); if (mu_address_create (&addr, str)) continue; if (ncols > 0) { - str = method_result (method, md, i, 1); + str = dictionary_result (dict, md, i, 1); if (str) mu_address_set_personal (addr, 1, str); } mu_address_union (&rcpt, addr); mu_address_destroy (&addr); } - method_close (method, md); + dictionary_close (dict, md); return rcpt; } @@ -583,7 +583,7 @@ do_notify (struct file_triplet *trp, enum notification_event ev, break; case notify_owner: - rcpt = get_recipient (trp->spool->access_method[project_owner_method], + rcpt = get_recipient (trp->spool->dictionary[project_owner_dict], trp, &errp); } |