зеркало из https://github.com/mozilla/gecko-dev.git
fix 289003, make mapi send detect html msg bodies, sr=mscott
This commit is contained in:
Родитель
36eb2aa71d
Коммит
be3b927e1a
|
@ -39,8 +39,6 @@
|
|||
|
||||
#define MAPI_STARTUP_ARG "/MAPIStartUp"
|
||||
|
||||
#define MAPI_STARTUP_ARG "/MAPIStartUp"
|
||||
|
||||
#ifdef MOZ_LOGGING
|
||||
// this has to be before the pre-compiled header
|
||||
#define FORCE_PR_LOG /* Allow logging in the release build */
|
||||
|
@ -388,8 +386,10 @@ nsresult nsMapiHook::BlindSendMail (unsigned long aSession, nsIMsgCompFields * a
|
|||
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
|
||||
|
||||
// populate the compose params
|
||||
PRBool forcePlainText;
|
||||
aCompFields->GetForcePlainText(&forcePlainText);
|
||||
pMsgComposeParams->SetType(nsIMsgCompType::New);
|
||||
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
|
||||
pMsgComposeParams->SetFormat(forcePlainText ? nsIMsgCompFormat::PlainText : nsIMsgCompFormat::HTML);
|
||||
pMsgComposeParams->SetIdentity(pMsgId);
|
||||
pMsgComposeParams->SetComposeFields(aCompFields);
|
||||
pMsgComposeParams->SetSendListener(sendListener) ;
|
||||
|
@ -505,6 +505,10 @@ nsresult nsMapiHook::PopulateCompFields(lpnsMapiMessage aMessage,
|
|||
Body.AssignWithConversion(aMessage->lpszNoteText);
|
||||
if (Body.Last() != nsCRT::LF)
|
||||
Body.AppendLiteral(CRLF);
|
||||
|
||||
if (Body.Find("<html>") == kNotFound)
|
||||
aCompFields->SetForcePlainText(PR_TRUE);
|
||||
|
||||
rv = aCompFields->SetBody(Body) ;
|
||||
}
|
||||
|
||||
|
@ -711,6 +715,10 @@ nsresult nsMapiHook::PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
|
|||
if (NS_FAILED(rv)) return rv ;
|
||||
if (Body.Last() != nsCRT::LF)
|
||||
Body.AppendLiteral(CRLF);
|
||||
|
||||
if (Body.Find("<html>") == kNotFound)
|
||||
aCompFields->SetForcePlainText(PR_TRUE);
|
||||
|
||||
rv = aCompFields->SetBody(Body) ;
|
||||
}
|
||||
|
||||
|
@ -872,6 +880,9 @@ nsresult nsMapiHook::ShowComposerWindow (unsigned long aSession, nsIMsgCompField
|
|||
nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
|
||||
|
||||
PRBool forcePlainText;
|
||||
aCompFields->GetForcePlainText(&forcePlainText);
|
||||
pMsgComposeParams->SetFormat(forcePlainText ? nsIMsgCompFormat::Default : nsIMsgCompFormat::HTML);
|
||||
// populate the compose params
|
||||
pMsgComposeParams->SetType(nsIMsgCompType::New);
|
||||
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
|
||||
|
|
Загрузка…
Ссылка в новой задаче