Ejemplo n.º 1
0
        /// <summary>
        /// Merge all email to single string
        /// </summary>
        /// <param name="addresses">The email addresses</param>
        /// <returns>The single string of all emails</returns>
        public string GetEmailName(EmailAddressCollection addresses)
        {
            if (addresses == null || addresses.Count == 0)
            {
                return(string.Empty);
            }
            var emails = addresses.Select(p => p.Address).ToArray();

            return(string.Join(";", emails));
        }
Ejemplo n.º 2
0
 private static List <string> ConvertEmailAddressCollection(EmailAddressCollection emailAddressCollection)
 {
     return(emailAddressCollection.Select(address => address.ToString()).ToList());
 }