We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

EMail Questions

1. eMail date.

The “MailMessage” class has a method: getDate(). Questions:

a. What date is this (is it the received date, the sent date, the eMail was created)?
b. Is it possible to get the sent and received date from the class?

2. Time Zone for Mail Dates

When reading mail files from disk, the date seems to be adjusted for the timezone too many times for EML and EMLX files. It works correctly for MSG files. For example. I’m in the Pacific Time Zone in the US (currently GMT-7). If an eMail has a date of noon (as shown by the eMail program that created it), aspose shows the eMail to 7:00 PM. It seems to reading the local time as if it were GMT and adjusting back to the local time.

Is this a bug? Am I interpreting the dates incorrectly? Does this happen with all sources of EML and EMLX files (these files were created by outlook on the mac and by the mail program on the mac).

3. Body Text

Some mail messages have the body text saved more than once. In other APIs for mail it is possible to retrieve a single copy of the body text in HTML or Plain format. That does not appear to be the case with MailMessage.

Are there APIs that will do this for me?
Is there a way to tell if the body text contains more than one version of the message?

4. Opening PST Files already open by Outlook

Is it possible to open PST and OST files that are already open by outlook or do we have to force our users to quit outlook first?

5. MHTML and MHT File Formats

Outlook lets me save a message in two different “html” formats. The “mht” format produces a single file with a “.mht” extension. The “mhtml” format produces a folder with multiple files and the older doesn’t have an extension but seems to end with “_files”.

When I open an “.mht” file, I don’t seem to get any of the meta data from the eMail. I only am able to read the what appears to be a formatted version of the eMail that includes meta data like “from,” “to,” “date,” “subject.” Is this the expected behavior for “.mht” files.

6. Another post in this forum suggest that support for sending and receiving mail (similar to that available in the .net version) will be available in the "fall." Is there any new estimate as to when the new version will be released?

The attached zip has a sample program and sample files that demonstrate the issues above.

Hi Steven,


Thank you for using Aspose.Email and we are sorry for a delayed response.

We are currently analyzing your inquiries in detail and need a little time before we get back to you on this with our findings. Please spare us a little time and we will update you about our observations as soon as possible. We appreciate your patience in this regard.
Hi Steven,

Please accept our apology for a delayed response. We have gone through your questions and would like to share our knowledge with you for the ones that we thought we have understood completely. For others , we would request you to please provide more information in order for us to answer these.

SEGlass:
1. eMail date.

The “MailMessage” class has a method: getDate(). Questions:

a. What date is this (is it the received date, the sent date, the eMail was created)?
Ans: This date is Sent Date if sent/received message is extracted from mail box. If message is still not sent, this date is empty or invalid.
SEGlass:
b. Is it possible to get the sent and received date from the class?
Ans: You can get the sent and received dates as follow:

//MailMessage msg is extracetd from mail box

string sentDate = msg.getHeaders().get(“Date”);

OR

string sentDate = msg.getDate().toString();

string receivedDate = msg.getHeaders().get(“Received”);



Another way is to load into temporary MapiMessage and retrieve these as follow:

MapiPropertyCollection coll = mapiMsg.getProperties();

MapiProperty prop = coll.get(MapiPropertyTag.PR_CREATION_TIME);

if (prop != null)

System.out.println("PR_CREATION_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_CLIENT_SUBMIT_TIME);

if (prop != null)

System.out.println("PR_CLIENT_SUBMIT_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_DELIVER_TIME);

if (prop != null)

System.out.println("PR_DELIVER_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_MESSAGE_DELIVERY_TIME);

if (prop != null)

System.out.println("PR_MESSAGE_DELIVERY_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_ORIGINAL_DELIVERY_TIME);

if (prop != null)

System.out.println("PR_ORIGINAL_DELIVERY_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_ORIGINAL_SUBMIT_TIME);

if (prop != null)

System.out.println("PR_ORIGINAL_SUBMIT_TIME "+prop.getDateTime().toString());

prop = coll.get(MapiPropertyTag.PR_RECEIPT_TIME);

if (prop != null)

System.out.println("PR_RECEIPT_TIME "+prop.getDateTime().toString());


SEGlass:

2. Time Zone for Mail Dates

When reading mail files from disk, the date seems to be adjusted for the timezone too many times for EML and EMLX files. It works correctly for MSG files. For example. I’m in the Pacific Time Zone in the US (currently GMT-7). If an eMail has a date of noon (as shown by the eMail program that created it), aspose shows the eMail to 7:00 PM. It seems to reading the local time as if it were GMT and adjusting back to the local time.

Is this a bug? Am I interpreting the dates incorrectly? Does this happen with all sources of EML and EMLX files (these files were created by outlook on the mac and by the mail program on the mac).

Can you please mention to us the specific the EML/EMLX files and the MSG files that we can further analyze for these issues? Also, how you are retrieving the time zone information from these files?

SEGlass:

3. Body Text

Some mail messages have the body text saved more than once. In other APIs for mail it is possible to retrieve a single copy of the body text in HTML or Plain format. That does not appear to be the case with MailMessage.

Are there APIs that will do this for me?
Is there a way to tell if the body text contains more than one version of the message?

We would request you to please mention to us such a mail message from your provided sample files for our detailed analysis.

SEGlass:
4. Opening PST Files already open by Outlook

Is it possible to open PST and OST files that are already open by outlook or do we have to force our users to quit outlook first?

It is the default behaviour of PST/OST files to allow only a a single instance to be opened. Parallel access to these files is not supported.

SEGlass:
5. MHTML and MHT File Formats

Outlook lets me save a message in two different “html” formats. The “mht” format produces a single file with a “.mht” extension. The “mhtml” format produces a folder with multiple files and the older doesn’t have an extension but seems to end with “_files”.

When I open an “.mht” file, I don’t seem to get any of the meta data from the eMail. I only am able to read the what appears to be a formatted version of the eMail that includes meta data like “from,” “to,” “date,” “subject.” Is this the expected behavior for “.mht” files.

It seems to be an expected behaviour as this is the same in case of Outlook as well as Aspose.Email.

SEGlass:
6. Another post in this forum suggests that support for sending and receiving mail (similar to that available in the .net version) will be available in the "fall." Is there any new estimate as to when the new version will be released?

Can you please provide a link to the post, so that I can check the status of the issue from our Issue Tracking System and update you accordingly.

Once again, we are sorry for our delayed response. Please provide the additional information and we will get back to you as soon as possible with the aided information.
1a. Thank you. This is helpful.

1b. Thank you for the recommendations. This is working as you expected.

2. You wrote:

> Can you please mention to us the specific the EML/EMLX files
> and the MSG files that we can further analyze for these issues?
> Also, how you are retrieving the time zone information from these files?

The eml and emlx files that I attached to the original post all show this problem. It was interesting however to use the recommendations you made. I got different results (More evidence that something is going wrong with the getDate API.

In my test, reading msg.getHeaders().get(“Date”) returns a string with the correct answer. But using msg.getDate() returns the wrong answer.

As for understanding the correct time zone, I use the current time zone of the computer since these are local files.

3. I’ve posted a new .emlx file that has the body text more than once.

4. Thank you.

5. Thank you.

6. Back in June, 2012, someone started the thread

https://forum.aspose.com/t/39587

Babar Raza posted:

> Unfortunately, Aspose.Email for Java currently lacks the functionality
> that could enable you to send or receive email messages. We are
> planning to add features like email protocols including SMTP, POP3,
> IMAP and EWS functionality in 4th quarter of year 2012.

Is this still the plan? We need this functionality for our product and rather not look at alternate libraries to provide it.



Hi,


Thank you for further explanation and we are sorry for a delayed response.

2. I have extracted and compared the dates from your sample EML, EMLx, and MSG files, and I get the dates as follow. I have mentioned the files names and dates here for your reference discussion:

165501.emlx
-----------

Header Date: Mon, 20 Aug 2012 23:15:15 -0700
Date: Tue Aug 21 06:15:15 PKT 2012

165505.emlx
-----------

Header Date: Tue, 21 Aug 2012 05:35:44 -0700
Date: Tue Aug 21 12:35:44 PKT 2012

166530.emlx
-----------

Header Date: Wed, 05 Sep 2012 05:50:40 -0400 (EDT)
Date: Wed Sep 05 09:50:40 PKT 2012

166560.emlx
-----------

Header Date: Wed, 05 Sep 2012 11:21:35 -0700
Date: Wed Sep 05 18:21:35 PKT 2012

Results of additional test.eml
------------------------------

Header Date: Fri, 07 Sep 2012 17:06:37 -0700
Date: Sat Sep 08 00:06:37 PKT 2012

Results of additional test.msg
------------------------------

Header Date: 8 Sep 2012 05:06:37 +0500
Date: Sat Sep 08 05:06:37 PKT 2012

RE Results of scraping 10k identical Word files.msg
----------------------------------------------------

Header Date: 21 Aug 2012 17:35:44 +0500
Date: Tue Aug 21 17:35:44 PKT 2012

As per the information from API documentation, the Date property is set in Header type with information from the server (if absent at the sent time) when the message was submitted to the server. This displays the date information in UTC format, while the getDate() call converts the date according to local time zone and displays it for user’s view. We request you to please provide the message.getHeader().get(“Date”) and message.getDate() values as I have listed above, so that we can look at the values from your perspective.

3. Could you please have a look at the API functions such as MailMessage.getHtmlBody(), MailMessage.getTextBody() and MailMessage.getAlternateViews() and see if that can help you getting your requirements. If not, can you please name another mail API that provides this facility of extracting one copy of the body in plain text/html and share its output with us?


6. I have checked from our development team and would like to inform you that the email sending/receiving facility has been moved to the 2nd/3rd quarter of 2013 due to some other priority tasks. Please subscribe to our product release page and you would be able to find details about this feature’s implementation in the Release Notes once it has been completed.

The issues you have found earlier (filed as EMAILJAVA-33177) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.