Bug 1701864 - Prevent an error when using nsMsgSend.cpp together with SmtpService.jsm. r=mkmelin

The problem is SmtpService.jsm doesn't use nsISmtpUrl, so do_QueryInterface would always fail.

--HG--
extra : rebase_source : 9be167f7f3557f1a2ecbe90807daab3e9855a014
This commit is contained in:
Ping Chen 2021-04-05 12:01:21 +03:00
Родитель f46f082b6e
Коммит 65ffc39b9f
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -2867,8 +2867,9 @@ nsresult nsMsgComposeAndSend::DeliverFileAsMail() {
""_ns, getter_AddRefs(runningUrl), getter_AddRefs(mRunningRequest));
// set envid on the returned URL
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISmtpUrl> smtpUrl(do_QueryInterface(runningUrl, &rv));
if (NS_SUCCEEDED(rv))
nsresult rv2;
nsCOMPtr<nsISmtpUrl> smtpUrl(do_QueryInterface(runningUrl, &rv2));
if (NS_SUCCEEDED(rv2))
smtpUrl->SetDsnEnvid(nsDependentCString(mCompFields->GetMessageId()));
}
}