Bug 1270149 - Don't clobber options when using a template. r=mkmelin a=rkent (with no test) THUNDERBIRD452b1_2016051723_RELBRANCH
authorJorg K
Sat, 14 May 2016 13:34:57 +0200
branchTHUNDERBIRD452b1_2016051723_RELBRANCH
changeset 27117 d15084ee9caea3e9e2cb3ff55da668ae9a3cf495
parent 27116 15397c0df6eeebc9d366e27a236bc1396184e8be
child 27118 79d6facfe3da6af2b9fe3037b6ad127377eedb42
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1270149
Bug 1270149 - Don't clobber options when using a template. r=mkmelin a=rkent (with no test)
mailnews/compose/src/nsMsgCompose.cpp
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -1029,17 +1029,17 @@ nsMsgCompose::Initialize(nsIMsgComposePa
     nsAutoCString draftId; // will get set for drafts and templates
     rv = composeFields->GetDraftId(getter_Copies(draftId));
     NS_ENSURE_SUCCESS(rv,rv);
 
     // Set return receipt flag and type, and if we should attach a vCard
     // by checking the identity prefs - but don't clobber the values for
     // drafts and templates as they were set up already by mime when
     // initializing the message.
-    if (m_identity && draftId.IsEmpty())
+    if (m_identity && draftId.IsEmpty() && type != nsIMsgCompType::Template)
     {
       bool requestReturnReceipt = false;
       rv = m_identity->GetRequestReturnReceipt(&requestReturnReceipt);
       NS_ENSURE_SUCCESS(rv, rv);
       rv = composeFields->SetReturnReceipt(requestReturnReceipt);
       NS_ENSURE_SUCCESS(rv, rv);
 
       int32_t receiptType = nsIMsgMdnGenerator::eDntType;