コード例 #1
0
ファイル: my_mime.cs プロジェクト: MatfRS2/SeminarskiRadovi
        public static string get_comment(SharpMimeMessage mime_message)
        {
            string comment = "";

            if (mime_message.Header.ContentType.ToLower().IndexOf("text/plain") > -1 &&
                !MyMime.is_attachment(mime_message))
            {
                comment = mime_message.BodyDecoded;
            }
            else
            {
                comment = MyMime.extract_comment_text_from_email(mime_message, "text/plain");
                if (comment == null)
                {
                    comment = MyMime.extract_comment_text_from_email(mime_message, "text/html");
                }

                if (comment == null)
                {
                    comment = "NO PLAIN TEXT MESSAGE BODY FOUND";
                }
            }

            return(comment);
        }
コード例 #2
0
        public static string get_comment(SharpMimeMessage mime_message)
        {
            string comment = MyMime.extract_comment_text_from_email(mime_message, "text/plain");

            if (comment == null)
            {
                comment = MyMime.extract_comment_text_from_email(mime_message, "text/html");
            }

            if (comment == null)
            {
                comment = "NO PLAIN TEXT MESSAGE BODY FOUND";
            }

            return(comment);
        }
コード例 #3
0
        public static string get_comment(SharpMimeMessage mime_message)
        {
            string comment = MyMime.extract_comment_text_from_email(mime_message, "text/plain");

            // Corey says... commenting this out 2014-04-03.  I simply can't remember what I was thinking here.
            // Why would I copy the HTML version of the email into the comment text?

            //if (comment == null)
            //{
            //    comment = MyMime.extract_comment_text_from_email(mime_message, "text/html");
            //}

            if (comment == null)
            {
                comment = "NO PLAIN TEXT MESSAGE BODY FOUND";
            }

            return(comment);
        }