Next: , Previous: , Up: Library   [Contents][Index]


5.9 Email processing functions

Built-in Function: number email_map (string email)

Parses email and returns a bitmap, consisting of zero or more of the following flags:

EMAIL_MULTIPLE

email has more than one email address.

EMAIL_COMMENTS

email has comment parts.

EMAIL_PERSONAL

email has personal part.

EMAIL_LOCAL

email has local part.

EMAIL_DOMAIN

email has domain part.

EMAIL_ROUTE

email has route part.

These constants are declared in the email.mfl module. The function email_map returns 0 if its argument is not a valid email address.

Library Function: boolean email_valid (string email)

Returns ‘True’ (1) if email is a valid email address, consisting of local and domain parts only. E.g.:

email_valid("gray@gnu.org") ⇒ 1
email_valid("gray") ⇒ 0
email_valid('"Sergey Poznyakoff <gray@gnu.org>') ⇒ 0

This function is defined in email.mfl (see Modules).