Closed Bug 482966 Opened 11 years ago Closed 11 years ago

MAPI support for Windows Explorer Send To Mail Recipient doesn't work in 3.0b2

Categories

(Thunderbird :: General, defect, major)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: jnavas, Assigned: rain1)

References

Details

(Keywords: regression, Whiteboard: [Windows integration])

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2

When file(s) are selected in Windows Explorer, context menu Send To > Mail Recipient results in nothing happening with 3.0b2; Works fine in 2.0.0.19; 100% reproducible.

Reproducible: Always

Steps to Reproduce:
1. Select files in Windows Explorer
2. Right click to pop up Context Menu
3. Select Send To > Mail Recipient
Actual Results:  
Nothing happens

Expected Results:  
Thunderbird Compose window opens with selected files Attached.
John any error messages in the Console Log ? is TB the default email client for your windows machine ?
Version: unspecified → Trunk
2.0.0.19 was removed first just to be sure.
3.0b2 was installed as Default Mail application, verified after install in both TB and Control Panel > Internet Options > Programs.
All Add-ons are disabled.
TB should launch in response to Send To > Mail Recipient. It doesn't.
No messages appear afterward in Windows Event Viewer.
When I start TB manually I get:
   Warning: Timed textboxes are deprecated. Consider using type="search" instead.
   Source File: chrome://messenger/content/messenger.xul
   Line: 0
No new messages appear in response to Send To > Mail Recipient.
WFM, Thunderbird 3.0, beta 2, running on Windows Vista, x86, SP2 RC. 

If starting Thunderbird normally results in an error message, that is a sign of a problem. Have you tried re-installing Thunderbird?
(In reply to comment #2)

> When I start TB manually I get:
>    Warning: Timed textboxes are deprecated. Consider using type="search"
> instead.
>    Source File: chrome://messenger/content/messenger.xul
>    Line: 0
> No new messages appear in response to Send To > Mail Recipient.

these are normal.

Anything in the NT event viewer ?
(In reply to comment #3)
> Have you tried re-installing Thunderbird?

Yes. Twice more. Same problem.

(In reply to comment #4)
> Anything in the NT event viewer ?

Nothing in the Windows Event Viewer (as noted in comment #2).
There's bug 390331 for tb2 of course...
Duplicate of this bug: 484776
Same here. Using regsvr32 to attempt to force register mozMapi32.dll results in the following error: 

"C:\Program Files\Mozilla Thunderbird\mozMapi32.dll was loaded, but the DllRegisterServer entry point was not found. 

This file can not be registered." 

Please note that I installed TB3 beta 3 into C:\Program Files\Mozilla Thunderbird.
In other words, this is confirmed on my end and a workaround failed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [Windows integration]
This is WFM with
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b4pre) Gecko/20090408 Lightning/1.0pre Shredder/3.0b3pre

Is there a MapiProxy_InUse.dll in the install directory?

Also, tThe file to register is MapiProxy_InUse.dll... mozMapi32.dll and mozMapi32_InUse.dll can't be registered with regsvr32 and the registry entries for mozMapi32_InUse.dll are added via the installer.
If this bug is still present in b3 should it be marked at blocking for TB3?
yes, I would say so.
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b3
Assignee: nobody → ludovic
(In reply to comment #9)
> In other words, this is confirmed on my end and a workaround failed.

John  can you read comment 10 and reply to it ?

I've been trying to reproduce this issue for a few hours now using different builds and like :rs it works for me. Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2.

Wayne seems to reproduce on winXP. I'll try on an XP VM.
OS Name	Microsoft Windows XP Professional	
Version	5.1.2600 Service Pack 3 Build 2600	
Processor	x86 Family 6 Model 13 Stepping 6 GenuineIntel ~1798 Mhz	
Total Physical Memory	2,048.00 MB	

Thunderbird 2.0.0.21 (20090302) working properly with Send To > Mail Recipient.
Installed Thunderbird 3 Beta 2 as default email client.
Send To > Mail Recipient stopped working (nothing happens).
Install directory (C:\Program Files\Mozilla Thunderbird 3 Beta 2) contained:
2009-02-24  20:46            17,400 MapiProxy.dll
2009-02-24  20:46            17,400 MapiProxy_InUse.dll
2009-02-24  20:46            15,352 mozMapi32.dll
2009-02-24  20:46            15,352 mozMapi32_InUse.dll
Running "regsvr32 MapiProxy_InUse.dll" resulted in a "succeeded" dialog box.
Send To > Mail Recipient still does nothing (workaround failed).
[cont.]
Uninstalled Thunderbird 3 Beta 2. (No other change.)
Send To > Mail Recipient then resulted in a dialog box from Outlook saying that no default email client was installed.
Started Thunderbird 2.0.0.21 and set it as default email client.
Send To > Mail Recipient then started working normally again.
(In reply to comment #15)
> [cont.]
> Uninstalled Thunderbird 3 Beta 2. (No other change.)
> Send To > Mail Recipient then resulted in a dialog box from Outlook saying that
> no default email client was installed.

confirming this - this seems windows XP only.

Regression window is between August 5 and 6 2008. Which has http://hg.mozilla.org/comm-central/rev/ea479bed5229, http://hg.mozilla.org/comm-central/rev/9a0a4988f232 and http://hg.mozilla.org/comm-central/rev/bca234658e11 .
Assignee: ludovic → nobody
Blocks: 404609
When in this state could someone export the following registry key and attach them to this bug?
HKEY_LOCAL_MACHINE\Software\Clients\Mail\Mozilla Thunderbird
Is the key slightly different for Vista? I'm in this state for Vista, iirc.
Attached file Exported registry keys
> When in this state could someone export the following registry key and attach
> them to this bug?
> HKEY_LOCAL_MACHINE\Software\Clients\Mail\Mozilla Thunderbird

Here you go. Could we have changed something else at that time too - like compile/link options and that broke XP support ?
I don't think this should cause this but the following registry is pointing to the original dll instead of the copy
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Mozilla Thunderbird]
@="Mozilla Thunderbird"
"DLLPath"="C:\\Program Files\\Shredder\\mozMapi32.dll"
Does the following file exist?
C:\Program Files\Shredder\mozMapi32_InUse.dll

Does changing the value for DDLPath to
C:\Program Files\Shredder\mozMapi32_InUse.dll
under
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Mozilla Thunderbird
fix this for you
(In reply to comment #22)
> Does the following file exist?
> C:\Program Files\Shredder\mozMapi32_InUse.dll
> 
No.
Does C:\Program Files\Shredder\thunderbird.exe exist?
Was Thunderbird installed from an installer or zip build?
Did you install a different version of Thunderbird and then uninstall it?
(In reply to comment #24)
> Does C:\Program Files\Shredder\thunderbird.exe exist?

C:\Program Files\Shredder>dir *.exe
 Volume in drive C has no label.
 Volume Serial Number is F47B-B9CC

 Directory of C:\Program Files\Shredder

06/08/2008  10:24           161.792 crashreporter.exe
06/08/2008  10:24        10.459.136 thunderbird.exe
06/08/2008  10:24           238.592 updater.exe
               3 File(s)     10.859.520 bytes
               0 Dir(s)  39.877.783.552 bytes free

C:\Program Files\Shredder>

> Was Thunderbird installed from an installer or zip build?

Installer

> Did you install a different version of Thunderbird and then uninstall it?

I installed on a vmware after each install I reseted the vmware image to bare system + vmwaretools + antivirus.
Could you run the installer again and report back if the following file exists?
C:\Program Files\Shredder\mozMapi32_InUse.dll

as well as what the DLLPath registry entry points to under
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Mozilla Thunderbird
(In reply to comment #26)
> Could you run the installer again and report back if the following file exists?
> C:\Program Files\Shredder\mozMapi32_InUse.dll

Just did. no file does not exist.
 
> as well as what the DLLPath registry entry points to under
> HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Mozilla Thunderbird
C:\Program Files\Shredder\mozMapi32.dll
Robert do you want me to run filemon and regmon ?
That may shed some light on this. Could you also provide the mozilla.org link to the installer you used?
(In reply to comment #29)
> That may shed some light on this. Could you also provide the mozilla.org link
> to the installer you used?

http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2008/08/2008-08-06-00-comm-central/thunderbird-3.0b1pre.en-US.win32.installer.exe.
I was under the impression you were using a newer build for testing which is why I was confused by mozMapi32_InUse.dll not being used. Please test again using the 3.0b2 build
http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0b2/win32/en-US/

There is no point in checking with filemon or regmon at this point due to this latest info
I was testing with the first build that broke :-)

With that I get :
C:\Program Files\Mozilla Thunderbird 3 Beta 2>dir *exe
 Volume in drive C has no label.
 Volume Serial Number is F47B-B9CC

 Directory of C:\Program Files\Mozilla Thunderbird 3 Beta 2

25/02/2009  05:46           189.944 crashreporter.exe
25/02/2009  05:46        11.003.384 thunderbird.exe
25/02/2009  05:46           245.240 updater.exe
25/02/2009  05:46            22.520 WSEnable.exe
               4 File(s)     11.461.088 bytes
               0 Dir(s)  39.734.308.864 bytes free

C:\Program Files\Mozilla Thunderbird 3 Beta 2>dir moz*.dll
 Volume in drive C has no label.
 Volume Serial Number is F47B-B9CC

 Directory of C:\Program Files\Mozilla Thunderbird 3 Beta 2

25/02/2009  05:46           722.424 mozcrt19.dll
25/02/2009  05:46            15.352 mozMapi32.dll
25/02/2009  05:46            15.352 mozMapi32_InUse.dll
               3 File(s)        753.128 bytes
               0 Dir(s)  39.734.308.864 bytes free

and the regkey  points to C:\Program Files\Mozilla Thunderbird 3 Beta 2\mozMapi32_InUse.dll
Does send to work after the install? If not, can you try to reboot and check if send to works then?
Also, can you try using send to with the MSVCRT files in the installation dir. You can get them by installing the original build you provided a link to. Then copy the following files to a safe place
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll

Then install the newer build and then copy those files into the install dir. It is possible though unlikely that the dll's require these files in the install dir
(In reply to comment #33)
> Does send to work after the install? If not, can you try to reboot and check if
> send to works then?

No - does not.

(In reply to comment #34)
> Also, can you try using send to with the MSVCRT files in the installation dir.
> You can get them by installing the original build you provided a link to. Then
> copy the following files to a safe place
> Microsoft.VC80.CRT.manifest
> msvcm80.dll
> msvcp80.dll
> msvcr80.dll
> 

You mean from a build where it works ? and by install dir you mean the final destination where the program is installed - not the dir setup.exe takes the files from.
(In reply to comment #35)
>...
> You mean from a build where it works ? and by install dir you mean the final
> destination where the program is installed - not the dir setup.exe takes the
> files from.
Yes. These files will be in the directory that Thunderbird was installed into for the older build and will need to be placed in the that Thunderbird was installed into for the newer build.

note: at this point the only things I can think of that could be causing this are either the registration of MapiProxy_InUse.dll or there is some code in nsIMapiSupport needed by XP that isn't needed by Vista which would be rather surprising.

Can you also try manually registering MapiProxy_InUse.dll in the newer builds installation directory?
(In reply to comment #36)
> (In reply to comment #35)
> >...
> > You mean from a build where it works ? and by install dir you mean the final
> > destination where the program is installed - not the dir setup.exe takes the
> > files from.
> Yes. These files will be in the directory that Thunderbird was installed into
> for the older build and will need to be placed in the that Thunderbird was
> installed into for the newer build.

So something changed as I did not uninstall the first build (the working one), after that when 3.0b2 is installed Mailto does just nothing - I don't get the outlook configuration screen.

Copying the dll didn't change a thing. 
 
> note: at this point the only things I can think of that could be causing this
> are either the registration of MapiProxy_InUse.dll or there is some code in
> nsIMapiSupport needed by XP that isn't needed by Vista which would be rather
> surprising.
> 
> Can you also try manually registering MapiProxy_InUse.dll in the newer builds
> installation directory?

no change when I did that.
At this point I am leaning toward this being caused by something in nsIMapiSupport needed by XP.

note: I'll be offline for the next few days and won't be able to get back to this until probably mid next week.
XP-only might be a red herring, especially as I know it affects windows7 too, and if i didn't misunderstand comment 18, bienvenu has seen it on vista.
I thought I saw it on Vista 64 before, but it's working fine now.
I'm seeing this problem with Windows 7 RC 64.
(In reply to comment #39)
> XP-only might be a red herring, especially as I know it affects windows7 too,

I meant that I could reproduce at will on windows , while it works fine on vista - for me.
I spent some time debugging this on Windows 7 x64, and found this --

- mozMapi32_InUse.dll is loaded fine -- I used the MAPI application available at <http://support.microsoft.com/kb/171096> -- and works till calling CoCreateInstance here: <http://mxr.mozilla.org/comm-central/source/mailnews/mapi/mapiDll/MapiDll.cpp#124>. So I doubt there's any trouble with registry entries.

- This is proxied over to thunderbird.exe, which receives it fine as well. It gets QIed here: <http://mxr.mozilla.org/comm-central/source/mailnews/mapi/mapihook/src/msgMapiImp.cpp#92> to the standard COM stuff, then finally to the IID of nsIMapi. We return success when QIed to nsIMapi.

- There are no more QIs or other function calls (AFAICT -- I set breakpoints at every function to check) after that, and after a bunch of Release()s, the CMapiImp destructor is called.

It really sounds like the proxying code isn't happy for some reason. The trouble doesn't sound like it's with the HKLM\Software\Clients stuff.
Oh, forgot to add that the CoCreateInstance finally returns with a E_NOINTERFACE.
So the problem is just that since we're using a custom interface, that needs to be registered as well. We aren't doing that right now. I think I can write a patch for this.
Never mind -- the installer (during install at least) does seem to register the dll properly. There seems to be another problem.
So there seem to be a couple of problems due to which mapi is broken:
- bug 209985 (broken on XP -- Vista seems to respect that value for MAPI as well)
- the fact that the dll links against mozcrt19.dll -- and we can't find it

A registry fix + copying mozcrt19.dll to c:\windows gets it to start working again. A solution might be to stop linking mozMapi32.dll/MapiProxy.dll against mozcrt19.dll.
Duplicate of this bug: 380299
I've put up a try server build with a proposed patch:

http://s3.mozillamessaging.com/build/try-server/2009-05-12_11:16-sid.bugzilla@gmail.com-1242150034/sid.bugzilla@gmail.com-1242150034-mail-try-win32.installer.exe

With a fresh install of Windows XP SP3, these instructions look like they work for me:
1. Download the installer above.
2. Install it, but *uncheck* "Use Shredder as my default mail client" during the install process.
3. Start Shredder up, and choose to use it as your default email client.

Send To Recipient should now work.

Could someone else confirm this?
Attached patch proposed patch (obsolete) — Splinter Review
This is the patch I submitted to the try server.
(In reply to comment #49)
> Could someone else confirm this?

Confirming on XP + SP3. Working on a already working version of Vista+ SP1. Anyone willing to test on SP2 ?

>2. Install it, but *uncheck* "Use Shredder as my default mail client" during
the install process.
Then maybe we also need to remove the checkbox from the installer ?
(In reply to comment #51)
> Then maybe we also need to remove the checkbox from the installer ?

I was thinking we should fix this instead. I need to test a bit more to see what's going wrong there, if anything.
Works also on Win-7 x64
Looks like this patch should work -- I'll look into the setup problems in another bug.
Assignee: nobody → sid.bugzilla
Attachment #377097 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #377126 - Flags: superreview?(bienvenu)
Attachment #377126 - Flags: review?(bienvenu)
Attachment #377126 - Flags: superreview?(bienvenu)
Attachment #377126 - Flags: superreview+
Attachment #377126 - Flags: review?(bienvenu)
Attachment #377126 - Flags: review+
Comment on attachment 377126 [details] [diff] [review]
remove assignment to rv, since we aren't bothered about it

Do you also need the mapistartup command line handling change as well as the static linking?
(In reply to comment #55)
> (From update of attachment 377126 [details] [diff] [review])
> Do you also need the mapistartup command line handling change as well as the
> static linking?

I thought I needed it, but a retest shows I don't. In any case, this is something that's been broken since we stopped using xpfe -- xpfe handled it and we don't. Do you want me to remove this part from the patch?
(In reply to comment #56)

> I thought I needed it, but a retest shows I don't. In any case, this is
> something that's been broken since we stopped using xpfe -- xpfe handled it and
> we don't. Do you want me to remove this part from the patch?

If it's ultimately the "right" thing to do, you can leave it in.
Keywords: checkin-needed
(In reply to comment #54)
> Created an attachment (id=377126) [details]
> remove assignment to rv, since we aren't bothered about it
> 
> Looks like this patch should work -- I'll look into the setup problems in
> another bug.
btw: there appears to be a bug with XP 64 where it doesn't properly read the default client registry entries - bug 326137.
No longer blocks: 404609
Checked in: http://hg.mozilla.org/comm-central/rev/ca5f5cc54427

sid, please close if appropriate.
Keywords: checkin-needed
Thanks! The setup problem is more general and can be handled in another bug. I'll get around to filing that.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to comment #60)
> Thanks! The setup problem is more general and can be handled in another bug.
> I'll get around to filing that.

Bug 493060 filed.
Attached patch kjkjkSplinter Review
(In reply to comment #62)
> Created an attachment (id=432872) [details]
> kjkjk

Giovanni what are you trying to do ?
You need to log in before you can comment on or make changes to this bug.