Generates a hash value from the specified email address.
Returns null if emailAddress is empty or null.
@param emailAddress the email address to generate a hash from
@return a hash value of the specified email address
@since 1.0.0
497433
public static String generateHash(String emailAddress) {
        if (StringUtils.isBlank(emailAddress)) {
            return null;
        }
        return DigestUtils.md5Hex(emailAddress.trim().toLowerCase()).toLowerCase();
    }
935849
public void setAddress(final String address) {
		// Do we have a subaddressing account?
		Preconditions.checkArgument(StringUtils.startsWith(this.address, accountId + "+"),
				"Mail address can only be changed when subaddressing is active");
		Preconditions.checkArgument(StringUtils.startsWith(address, accountId), "New mail address %s does not start with accountId=%s", address,
				accountId);
		log.info("Changing mail address from {} to {}", this.address, address);
		this.address = address;
	}
583467
public final static boolean isValidEmail(String email) {
        if (email == null) {
            return false;
        } else {
            return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();
        }
    }
453076
def get_mailbox(self, email=None, email_hash=None):
        
        if email is None:
            email = self.get_email_address()
        if email_hash is None:
            email_hash = self.get_hash(email)

        url = 'http://{0}/request/mail/id/{1}/format/json/'.format(
            self.api_domain, email_hash)
        req = requests.get(url)
        return req.json()
130727
public static HashAlgorithm getHashAlgorithm(String hashAlgorithm) {
	if (hashAlgorithm==null) {
		return null;
	}
	switch (hashAlgorithm) {
		case "md2": return HashAlgorithm.md2;
		case "md4": return HashAlgorithm.md4;
		case "md5": return HashAlgorithm.md5;
		case "none": return HashAlgorithm.none;
		case "ripemd128": return HashAlgorithm.ripemd128;
		case "ripemd160": return HashAlgorithm.ripemd160;
		case "sha1": return HashAlgorithm.sha1;
		case "sha224": return HashAlgorithm.sha224;
		case "sha256": return HashAlgorithm.sha256;
		case "sha384": return HashAlgorithm.sha384;
		case "sha512": return HashAlgorithm.sha512;
		case "whirlpool": return HashAlgorithm.whirlpool;
		default:
			LOG.error("Uknown hash algorithm: \""+hashAlgorithm+"\"");
			break;
	}
	return null;
}
237823
public function hash($email)
	{
		if (!filter_var($email, FILTER_VALIDATE_EMAIL))
		{
			throw new InvalidEmailException('Please specify a valid email address');
		}

		return md5(strtolower(trim($email)));
	}
674176
public static String getEmailDomain(final String email) {
    if (email == null || email.isEmpty()) {
      return null;
    }

    final int atSignIndex = email.indexOf('@');
    if (atSignIndex != -1) {
      return email.substring(atSignIndex + 1);
    }

    return null;
  }
1361277
public Email bcc(EmailAddress... bcc) {
		for (EmailAddress b : bcc) {
			recipient(b, RecipientType.BCC);
		}
		return this;
	}
818134
public function getEmailHash()
	{
		if ($this->_emailHash !== null) {
			return $this->_emailHash;
		} elseif ($this->email === null) {
			throw new InvalidConfigException('No email specified for Gravatar image Widget.');
		}
		return $this->_emailHash = md5(strtolower(trim($this->email)));
	}
387413
public Email to(EmailAddress... to) {
		for (EmailAddress t : to) {
			recipient(t, RecipientType.TO);
		}
		return this;
	}
1368107
@Override
	public Inet6Address toInetAddress() {
		if(hasZone()) {
			Inet6Address result;
			if(hasNoValueCache() || (result = valueCache.inetAddress) == null) {
				valueCache.inetAddress = result = (Inet6Address) toInetAddressImpl(getBytes());
			}
			return result;
		}
		return (Inet6Address) super.toInetAddress();
	}
564594
public static void mail(String mailAddress) {
		final Desktop dsktop = getDsktop();
		try {
			dsktop.mail(URLUtil.toURI(mailAddress));
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
255556
private Map<String, String> getEmails(Map<String, String> emails) {

		if (emails == null || emails.size() == 0) {
			return null;
		}

		Map<String, String> out = new HashMap<>();

		for (String email : emails.keySet()) {
			if (excluded(email)) {
				continue;
			}

			out.put(email, emails.get(email));
		}

		return out;
	}
670987
public Email cc(EmailAddress... cc) {
		for (EmailAddress c : cc) {
			recipient(c, RecipientType.CC);
		}
		return this;
	}
797665
public java.util.List<String> getVerifiedEmailAddresses() {
        if (verifiedEmailAddresses == null) {
            verifiedEmailAddresses = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return verifiedEmailAddresses;
    }
476760
private String getEmail(Server server) {
        Xpp3Dom configuration = (Xpp3Dom) server.getConfiguration();
        if (configuration != null) {
            Xpp3Dom emailNode = configuration.getChild("email");
            if (emailNode != null) {
                return emailNode.getValue();
            }
        }
        return null;
    }
551657
public function convertEmailAddress(string $emailAddress): string
    {
        if (strpos($emailAddress, '@') === false) {
            throw new InvalidArgumentException('The given string does not look like an email address', 206);
        }

        $parts = explode('@', $emailAddress);

        return sprintf(
            '%s@%s',
            $parts[0],
            $this->convert($parts[1])
        );
    }