From 9349f738df71e3a0761bcc0edb33c5e2d52e9c24 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Fri, 15 Dec 2006 16:20:32 +0000 Subject: [PATCH] don't send rtf or vcs files as text/plain, sr=mscott 363764 --- mailnews/compose/src/nsMsgSend.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp index c9057beb1029..48f67ec307ce 100644 --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -2347,6 +2347,11 @@ nsMsgComposeAndSend::AddCompFieldLocalAttachments() if (!type.Equals("multipart/appledouble")) // can't do apple double on non-macs #endif m_attachments[newLoc].m_type = ToNewCString(type); + // rtf and vcs files may look like text to sniffers, + // but they're not human readable. + if (type.IsEmpty() && !fileExt.IsEmpty() && + (fileExt.LowerCaseEqualsLiteral("rtf") || fileExt.LowerCaseEqualsLiteral("vcs"))) + m_attachments[newLoc].m_type = PL_strdup(APPLICATION_OCTET_STREAM); } } }