Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added message ID and received date #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rvdbdvr
Copy link

@rvdbdvr rvdbdvr commented Jan 12, 2016

To build a Java version of mailcatcher (test-tool that serves as an SMTP server, keeps all mail and provides a webinterface to browse messages received, see http://mailcatcher.me/), that can be deployed as a .war, I needed messages to have an ID (number) and a reception date. So I added those two attributes. Plus a method to retrieve a message by ID.
The mailcatcher lookalike will be in a separate project.

Added method to retrieve message by ID.
Copy link

@master-bob master-bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The potential for issues arises out of having Wiser.java setting the ID as an int value and WiserMessage.java accepting longs for IDs.

For example:
I can imagine a scenario where a user sets an ID for a WiserMessage as a non-int long, and then attempts to retrieve that ID from Wiser and would get a null.

My recommendation would be to make the ID int based throughout as that is the limitation provided by ArrayList.

@@ -37,6 +44,22 @@ public MimeMessage getMimeMessage() throws MessagingException
}

/**
* Get message identifier
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded space.

/**
* Set message identifier
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants