The webmail_keys_avail() command checks whether a GINA account is available for the recipient.
Structure of the command
webmail_keys_avail(['template']);
Return value
positive |
for the group with existing GINA account |
negative |
for the group without GINA account |
Parameters
template (optional) (new in 14.0.5)
Defines the GINA domains to be used.
If no parameter is specified, the template is selected based on the email domain of the sender address (see Mail System Managed domains Settings GINA domain)
Example 1
Line |
Code |
---|---|
01 |
if (webmail_keys_avail()) { |
02 |
log(1,'GINA account already exists'); |
03 |
} else { |
04 |
log(1,'no GINA account available, creating new account'); |
05 |
webmail_keys_gen('','8'); |
06 |
} |
Explanation
In this example, it is first checked whether a GINA account is present (line 01). The result of this query is logged (lines 02 and 04). If no GINA account is available, a new one will be created (line 05).