SYNOPSIS
int MGOsetmail (Subscription *sub, int opts)
DESCRIPTION
The MGOsetmail() function sets the mail forwarding address for a
uwnetid, according to the rules specified here.
Information is passed through sub and returned through the
linked list lst. The required fields are:
- sub.uwnetid
- sub.subscription_code
- sub.subscription_data
sub.uwnetid is the uwnetid name. sub.subscription_code is the
subscription reference code for the mail forwarding subscription.
sub.subscription_data is the mail forwarding address. If specified as
"*", it will be set wisely by the server. opts can be one or
more of:
- 0 - Default behavior
- 1 - Force completion (overrides MGO_E_IFA error)
Note: Upon successful return, the sub.subscription_data field will be
set to the resultant forwarding address.
RETURN VALUE
Returns 1 upon success or -1 if an error occurred (in which case
MGOerrno and MGOerrmsg are set appropriately).
ERRORS
- MGO_E_MAR - One or more of the required arguments were missing
- MGO_E_IAR - Invalid or ambiguous argument
- MGO_E_PMD - Permission denied. See access control
- MGO_E_ISC - Invalid subscription code (not a mail forwarding subscription)
- MGO_E_SNP - Subscription is not permitted for uwnetid
- MGO_E_IFA - Invalid mail forwarding address
- MGO_E_MAT - No match found (no such uwnetid)
- MGO_E_SQL - An SQL error occurred. See MGOerrmsg for details
AUTHENTICATION LEVEL
wmango
SEE ALSO
MGOgetmail(),
MGOselrsubscription(),
MGOzero()