Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ph_email_resolve(3)		C Library Calls		   ph_email_resolve(3)

NAME
       ph_email_resolve,  ph_advertised_email  - determine PH-redirected email
       addresses

SYNOPSIS
       #include	<phclient.h>

       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);

VERSION
       This man	page documents version 1.2 of libphclient.

DESCRIPTION
       The ph_email_resolve() function resolves	the email address  whose  user
       portion	is user.  The real_email argument is set to point to a dynami-
       cally-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 server's mailmatches	siteinfo field.	 If the	server doesn't support
       the  mailmatches	 field,	 ph_email_resolve()  falls back	to the default
       list, which is "alias:callsign".

       The ph_email_resolve() function returns the email address found in  the
       field  specified	by the server's	mailbox	siteinfo field.	 This is typi-
       cally set to email, which means that the	email address will be found in
       the user's email	field.

       The  ph_advertised_email() function determines the advertised email ad-
       dress 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	adver-
       tised_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.

RETURN VALUE
       These functions return 0	on success, PH_ERR_NOMATCH if a	single	match-
       ing  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.

ERRORS
       These  functions	 will  fail with EINVAL	if the server does not support
       the mailbox or mailfield	siteinfo entries, or if	they receive an	 unex-
       pected  response	code from the server.  In addition, they may fail with
       any error from the functions read() or write().

SEE ALSO
       read(2),	write(2), ph_open(3), ph_siteinfo(3)

University of Illinois		   Oct 2002		   ph_email_resolve(3)

NAME | SYNOPSIS | VERSION | DESCRIPTION | RETURN VALUE | ERRORS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=ph_email_resolve&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help