Beispiel #1
0
        internal static bool Decode(ref string addressType, ref string address, string imceaResolvableDomain)
        {
            if (imceaResolvableDomain == null)
            {
                return(false);
            }
            int num = ImceaAddress.FindImceaDashPosition(address);

            if (num <= "IMCEA".Length)
            {
                return(false);
            }
            string text = address.Substring("IMCEA".Length, num - "IMCEA".Length);
            int    num2 = address.LastIndexOf('@');

            if (num2 < 0 || num2 == address.Length - 1)
            {
                return(false);
            }
            string strA = address.Substring(num2 + 1, address.Length - num2 - 1);

            if (string.Compare(strA, imceaResolvableDomain, StringComparison.OrdinalIgnoreCase) != 0)
            {
                return(false);
            }
            ProxyAddress proxyAddress = null;

            if (!SmtpProxyAddress.TryDeencapsulate(address, out proxyAddress))
            {
                return(false);
            }
            addressType = text.ToUpper();
            address     = proxyAddress.AddressString;
            return(true);
        }
Beispiel #2
0
 public static bool IsImceaAddress(string address)
 {
     return(ImceaAddress.FindImceaDashPosition(address) >= "IMCEA".Length);
 }