@OptimizeMailAddress (Formula Language)

Returns a mail address with all unnecessary domains removed.

Syntax

@OptimizeMailAddress( address )

Parameters

address

Text or text list. The mail address to optimize.

Return value

optimizedAddress

Text or text list. The optimized address.

Usage

If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

All domains between two duplicate domains, including the duplicate domain, are removed.

Examples

  1. This example returns "username @ firstdomain @ thirdomain."
    @OptimizeMailAddress ("username @firstdomain @secondomain @firstdomain @thirdomain")
  2. This example returns "username @ firstdomain @ secondomain."
    @OptimizeMailAddress ("username @firstdomain @firstdomain @secondomain")
  3. This example returns "username @ firstdomain @ thirdomain" and "username @ firstdomain @ secondomain" in a list.
    @OptimizeMailAddress ("username @firstdomain @secondomain @firstdomain @thirdomain" :"username @firstdomain @firstdomain @secondomain")