Manual Reference Pages - PH_ADVERTISED_EMAIL (3)
ph_email_resolve, ph_advertised_email - determine PH-redirected email addresses
int ph_email_resolve(PH *ph, char *user,
char *fields, char **real_email);
int ph_advertised_email(PH *ph, char *alias,
int confirm_alias, char **advertised_email);
This man page documents version 1.2 of libphclient.
The ph_email_resolve() function resolves the email address whose
user portion is user. The real_email argument is set to
point to a dynamically-allocated string containing the resolved email
address. This memory must be later freed by the calling application.
The fields argument is a string containing a space- or
colon-delimited list of field names to match entries on. If fields
is NULL or points to an empty string, ph_email_resolve() uses
the field list specified by the servers mailmatches siteinfo
field. If the server doesnt support the mailmatches field,
ph_email_resolve() falls back to the default list, which is
The ph_email_resolve() function returns the email address found in
the field specified by the servers mailbox siteinfo field.
This is typically set to email, which means that the email address
will be found in the users email field.
The ph_advertised_email() function determines the advertised
email address for the user whose alias is alias. If confirm_alias
is set, the entry for alias is looked up to make sure it exists. The
advertised_email argument is set to point to a dynamically-allocated
string containing the advertised email address. This memory must later
be freed by the calling application.
These functions return 0 on success, PH_ERR_NOMATCH if a single matching
entry cannot be found, and PH_ERR_DATAERR if the query is invalid.
On error, they return -1 and set errno.
In addition, ph_email_resolve() returns PH_ERR_DATAERR if a single
matching entry is found but contains no email field.
These functions will fail with EINVAL if the server does
not support the mailbox or mailfield siteinfo entries,
or if they receive an unexpected response code from the server.
In addition, they may fail with any error from the functions read()
|University of Illinois ||PH_EMAIL_RESOLVE (3) ||Oct 2002 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.