public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = ToAddresses.GetHashCode();
         hashCode = (hashCode * 397) ^ FromAddresses.GetHashCode();
         hashCode = (hashCode * 397) ^ Subject.GetHashCode();
         hashCode = (hashCode * 397) ^ Content.GetHashCode();
         return(hashCode);
     }
 }
        public bool Equals(EmailMessage other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(ToAddresses.All(other.ToAddresses.Contains) &&
                   FromAddresses.All(other.FromAddresses.Contains) &&
                   Subject == other.Subject &&
                   Content == other.Content);
        }