info.mailtraq.com > Management > Script Functions A-Z > NameOf() NameOf()Extract a comment, often the real name of the addressee, from an email address. If an address does not contain a comment, the address itself is returned.
name := NameOf( string )
- string
- The address string from which a comment is to be extracted
- name
- A string containing the extracted comment or the address if no comment
//Example usage
"Fred Bloggs" := NameOf("Fred Bloggs <fred@home.example.com>")
"Fred Bloggs" := NameOf("fred@home.example.com (Fred Bloggs)")
"fred@home.example.com" := NameOf("fred@home.example.com") |