internal static bool ValidateAddress(string address) { if (string.IsNullOrEmpty(address)) { return(false); } SmtpAddress smtpAddress = new SmtpAddress(address); return(smtpAddress.IsValidAddress && MeumProxyAddressE164.IsNumber(smtpAddress.Local) && string.Equals(smtpAddress.Domain, "um.exchangelabs.com", StringComparison.OrdinalIgnoreCase)); }
internal static bool ValidateE164Number(string phoneNumber) { return(!string.IsNullOrEmpty(phoneNumber) && phoneNumber[0] == '+' && phoneNumber.Length > 1 && MeumProxyAddressE164.IsNumber(phoneNumber.Substring(1))); }