eneam / mboxviewer

A small but powerfull app for viewing MBOX files
Other
424 stars 24 forks source link

One wish or request #47

Open Bokili-2022 opened 1 year ago

Bokili-2022 commented 1 year ago

Hello,

Your MBoxView is something unique, and that's exactly what I need. Thank you. Is there a possibility to add some code and make it so that clicking on the file MBoxView opens it. That's all I need to make it perfect. I often need this because it is demanding for me to transfer the .eml from my ftp server, where my messages arrive, to the computer in a separate/its directory. Thanks in advance.

zigm commented 1 year ago

Hi,

MBoxViewer v1.0.3.38 support command line option to preview eml files:

mboxview -EML_PREVIEW_MODE -MAIL_FILE="full eml file path"

To open eml file by clicking the eml file:

Create preview.cmd file as follow:

@echo off "G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.38\mboxview64.exe" -EML_PREVIEW_MODE -MAIL_FILE="%~1"

Note: Update path to mboxview executable to reflect your path.

Next, find any eml file and right click on the file and select Properties option. Select Change button and browse to select your preview.cmd file.

In the eml file preview mode, Mail Tree and Mail Summary windows are no longer visible. They exist but the size is set to zero. You can resize these windows manually in case you would like to print the mail.

I will create v1.0.3.39 to eliminate the need to create the preview.cmf file. The presentation will basically remain the same.

I am in the process to port MBoxViewer to UNICODE as v1.0.3.40 and may add options to configure whether to show Mail Tree and Mail Summary windows.

Let me know whether preview.cmd file worked for you and what is your preferred view of eml files.

mikedepetris commented 1 year ago

Good morning,

is there any reason not to assume "mboxview -EML_PREVIEW_MODE -MAIL_FILE="full eml file path"" when double clicking on an eml/mbox file?

On Fri, 6 Oct 2023 at 06:22, zigm @.***> wrote:

Hi,

MBoxViewer v1.0.3.38 support command line option to preview eml files:

mboxview -EML_PREVIEW_MODE -MAIL_FILE="full eml file path"

To open eml file by clicking the eml file:

Create preview.cmd file as follow:

@echo https://github.com/echo off "G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.38\mboxview64.exe" -EML_PREVIEW_MODE -MAIL_FILE="%~1"

Note: Update path to mboxview executable to reflect your path.

Next, find any eml file and right click on the file and select Properties option. Select Change button and browse to select your preview.cmd file.

In the eml file preview mode, Mail Tree and Mail Summary windows are no longer visible. They exist but the size is set to zero. You can resize these windows manually in case you would like to print the mail.

I will create v1.0.3.39 to eliminate the need to create the preview.cmf file. The presentation will basically remain the same.

I am in the process to port MBoxViewer to UNICODE as v1.0.3.40 and may add options to configure whether to show Mail Tree and Mail Summary windows.

Let me know whether preview.cmd file worked for you and what is your preferred view of eml files.

— Reply to this email directly, view it on GitHub https://github.com/eneam/mboxviewer/issues/47#issuecomment-1749963240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESNHQEKF4CD6YEP3SXVVQDX56BPTAVCNFSM6AAAAAA5RYEVYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBZHE3DGMRUGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bokili-2022 commented 1 year ago

Thank You. Is there a way to create a shortcut to open .eml files directly instead of .cmd or .bat commands in WIN?

And one more thing, The famous email program "makemime" generates a html content for *.eml message like this: Content-Type: text/html; charset=utf-8 Content-Disposition: inline; filename="message-2.htm" Content-Transfer-Encoding: base64

{base64 content here...}

Such "html" content is not displayed in the mboxview program (it is displayed as an attachment), but it should be, because we have "inline" (not "attachment") in Content-Disposition. So on Yahoo, Gmail and other online browsers and email viewers it is displayed, it would also work in mboxview.

Thank You very much.

zigm commented 1 year ago

A couple of comments.

By the initial design, MBoxViewer opens a folder and all mbox/eml files in that folder. MBoxViewer keeps track of all folders that were open and it reopen these folders upon startup.

The -EML_PREVIEW_MODE was added when one of users asked for ability to iterate the list of eml files from cmd file. MBox Viewer doesn't keep track of such actions. Opening a mbox/eml file is not "natural" to MBox Viewer design and I was going to review the implementation of the -EML_PREVIEW_MODE before adding ability to open the file directly. As you noticed, it didn't happen yet.

Currently you have to rely on cmd file to open eml by clicking. As I stated in my initial response, I will make one more non-UNICODE release to support opening eml file directly by leveraging the current implementation.

Inline handling is a bit messy due to mail clients not always following mime protocol specifications. But MBox Viewer needs to handle inlines better. The example you provided is apparently one of the cases that MBox Viewer needs to handle better. If you can attach an example of eml file (obviously no user sensitive information) that will be helpful. I am working to port MBox Viewer to UNICODE and I am trying not to make any more changes to the current code. I will take a look if limited change to current code can address the issue you raised.

Bokili-2022 commented 1 year ago

OK. I compiled a small exe launcher that opens files by clicking on them. It has the same .ico as MBox Viewer, but mine is called MBox Opener :)))

As for the program itself, everything is very well done. Actually, I wouldn't change anything, except to add the mentioned rendering of the html code. As a new idea, I suggest that clicks on the links in the message preview are caught, and run as new processes, so that it starts the default browser, not IE.

I am sending an example of a message whose html text is not displayed. So, if "Content-Type: text/html" and "Content-Disposition: inline" the content should be displayed as readable text, not as a file attachment. The same applies to "Content-Type: plain/text".

zaslanje.zip

I have a lot of experience with C Sharp, but not C++. understand me :( Regards.

zigm commented 1 year ago

Thanks for the attachment and comment. I will provide an update on progress.

Bokili-2022 commented 1 year ago

Here is my temporary solution for opening an EML file with a click, which I wrote to you about. It can also be used to launch MBoxViewer without any other command arguments.

MBoxOpener.zip

Checksums: File: MBoxOpener.exe CRC-32: 40200a16 MD4: a2cfcfced26067deda1bc4ba714e28e7 MD5: 8dec62f6d449cc8ef08acfeb6b3f8ffc SHA-1: 3fb3e4451e58ac6a3754c5020267be8e26b6a521

Regards.

zigm commented 1 year ago

I have released v1.0.3.39 to address direct open of mail files and handling of "Content-Type: text/html or text/plain" and "Content-Disposition: inline". I didn't implement option to register MBox Viewer as default application to open mail archives, I was a bit short of time. You need to manually configure MBox Viewer as the default application for .mbox and .eml files.

Let me know if you see Windows Defender warnings when trying to install. Sometimes Microsoft updates Windows Defender rules that break installation and I am forced to request Security team to fix the problem. Sometime ago, I described potential issue with Defender on main main page on Sourceforge. Please update Windows and try again if you see the warnings. Let me know if it didn't work.