Example #1
0
        /// <summary>
        /// Gets the name of the sender.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        internal static string GetSenderName(Pop3Message message)
        {
            if (message.Headers["Reply-To"] != null)
            {
                return(EMailMessage.ExtractFirstEmail(message.Headers["Reply-To"]));
            }

            //if (message.Headers["Sender"] != null)
            //    return EMailMessage.ExtractFirstShowName(message.Headers["Sender"]);

            return(EMailMessage.ExtractFirstShowName(message.Headers["From"]));
        }