No EML Reader
Opened this issue · 15 comments
In my system (without a mailClient), when I try to open the eml file, I receive an error.
12 Dez 2013 22:11:00 ERROR com.nilhcem.fakesmtp.gui.tab.MailsListPane - java.io.IOException: Failed to open E:\Users\Aron Rodrigues\Desktop\received-emails\121213100900205.eml. Error message: A device attached to the system is not functioning.
at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:76) ~[na:1.7.0_40]
at sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:54) ~[na:1.7.0_40]
at java.awt.Desktop.open(Desktop.java:272) ~[na:1.7.0_40]
at com.nilhcem.fakesmtp.gui.tab.MailsListPane$3.mouseClicked(MailsListPane.java:118) ~[fakeSMTP-1.5.jar:na]
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270) [na:1.7.0_40]
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269) [na:1.7.0_40]
at java.awt.Component.processMouseEvent(Component.java:6508) [na:1.7.0_40]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) [na:1.7.0_40]
at java.awt.Component.processEvent(Component.java:6270) [na:1.7.0_40]
at java.awt.Container.processEvent(Container.java:2229) [na:1.7.0_40]
at java.awt.Component.dispatchEventImpl(Component.java:4861) [na:1.7.0_40]
at java.awt.Container.dispatchEventImpl(Container.java:2287) [na:1.7.0_40]
at java.awt.Component.dispatchEvent(Component.java:4687) [na:1.7.0_40]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) [na:1.7.0_40]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4501) [na:1.7.0_40]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) [na:1.7.0_40]
at java.awt.Container.dispatchEventImpl(Container.java:2273) [na:1.7.0_40]
at java.awt.Window.dispatchEventImpl(Window.java:2719) [na:1.7.0_40]
at java.awt.Component.dispatchEvent(Component.java:4687) [na:1.7.0_40]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) [na:1.7.0_40]
at java.awt.EventQueue.access$200(EventQueue.java:103) [na:1.7.0_40]
at java.awt.EventQueue$3.run(EventQueue.java:694) [na:1.7.0_40]
at java.awt.EventQueue$3.run(EventQueue.java:692) [na:1.7.0_40]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_40]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) [na:1.7.0_40]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) [na:1.7.0_40]
at java.awt.EventQueue$4.run(EventQueue.java:708) [na:1.7.0_40]
at java.awt.EventQueue$4.run(EventQueue.java:706) [na:1.7.0_40]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_40]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) [na:1.7.0_40]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) [na:1.7.0_40]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) [na:1.7.0_40]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:161) [na:1.7.0_40] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) [na:1.7.0_40]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) [na:1.7.0_40]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) [na:1.7.0_40]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) [na:1.7.0_40]
May I contribute with an eml reader?
Yes, it could be useful, indeed.
Thanks,
Hello!
I'm building the eml reader, but I think I found a bug. Why do you skip the
first 4 lines from the stream? (It mess with the headers when you send the
email to more then one recipient i.e to: aronrodrigues@gmail.com,
Nilhcem@github.com).
If you try it and see the result (on outlook) you will notice that the from
field is empty.
May I remove those restriction (4 lines?)?
Regards.
On Fri, Dec 13, 2013 at 6:31 AM, Nilhcem notifications@github.com wrote:
Yes, it could be useful, indeed.
Thanks,
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-30493737
.
Aron Teixeira Rodrigues
Plano para dominar o mundo! - http://ppdom.wordpress.com
Hi,
Thanks for noticing it, you are right, we should not remove these lines - Don't really know why I did that 👎
Hi Nilhcem, Merry Christmas and Happy New Year
I have a question for you:
The HTML Viewer which comes in JSE is a little limited (HTML3.2 even o JSE7). So I thought on three reasonable solutions:
a) Use a external HTMLViewer library (do not like it very much)
b) Use my HTML3.2 Viewer only when your app throws the missing client exception.
c) Let the user choose to view the eml in his client or in the app's reader.
Anyway, I think it's a good idea to warn the user (anywhere on the reader screen) of the HTML3.2 limitation.
In my opinion the best solution is the (b) and maybe a configuration parameter to the user choose (some kind of c).
After a little research I found
http://cssbox.sourceforge.net
https://github.com/radkovo/CSSBox
I think it's the best library.
Hello Aron,
Indeed, using CSSBox seems to be a good decision - The new feature looks nice from your screenshot!
Hi,
There is any code available to test this feature?
I plan add some features to fakesmtp and this is one of them, I don't want reinvent the well:
Other features that I plan add to help mail integration tests:
- POP and IMAP: Simple support with mails from folder.
- no GUI option
Regards.
From all the features you listed, only the "no GUI option" is already in master
To start the SMTP server automatically (-s argument) on a different port (-p argument) with no gui (-b argument), saving emails in memory (-m) to improve the overall performances you can do:
java -jar fakeSMTP.jar -s -b -p 2525 -m
Hi,
Thanks for you reply, It's great. I'm see different options to add message view, some times messages with UTF-8 encoding, are coded in Base64 in MIME, so reading it is a bit difficult without a EML viewer, there is any progress on aronrodrigues solution.
Can I help to something?
Hi,
I haven't seen any code so far and haven't focused on this issue yet (as installing any eml viewer solves the issue), but aronrodrigues's solution to use CSSbox seems great.
Thinking longer about it, it looks like a great feature to include, but only when there is no default eml viewer installed on the OS (which occurs in the code when MailsListPane.java
displays the mailslist.err.open error).
Feel free to contribute and send a PR should you want to develop this feature.
Sorry about it, I was on vacation.
I have no luck finding a HTML5 viewer to display the messages.
On Sun, May 11, 2014 at 1:23 PM, Gautier MECHLING
notifications@github.comwrote:
Hi,
I haven't seen any code so far and haven't focused on this issue yet (as
installing any eml viewer solves the issue), but aronrodrigues's solution
to use CSSbox seems great.
Thinking longer about it, it looks like a great feature to include, but
only when there is no default eml viewer installed on the OS (which occurs
in the code when MailsListPane.java displays the mailslist.err.open
error).Feel free to contribute and send a PR should you want to develop this
feature.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-42775079
.
Aron Teixeira Rodrigues
Plano para dominar o mundo! - http://ppdom.wordpress.com
Did these changes ever get merged? Looked like the start of something useful...
Hello,
In case if anyone else needs client that can handle html emails, I've started LunaticSMTP project.
It's not directly based on that project but it's like a reimplementation of FakeSMTP with JavaFX. It's using JFX's WebView (with it's built-in WebKit) to display emails. Also because of JFX usage minimum required Java version was bumped to 8u40.
I know this is old, but I hope it would actually be closed without being merged, because one can also tell Windows (or Linux or whatever) to open *.eml files with the software they love (like, for me, Thunderbird) and I'm afraid merging such viewer into FakeSMTP will remove this nice behavior (one can still tell their OS to open *.eml file with the suggested viewer if one prefers)