Archived Forum Post

Index of archived forum posts


Chilkat MIME LocalDate or Email Date value is late by month or two from the day the message was created

Jul 18 '13 at 06:00

Everytime chilkat creates a MIME message, we save its value in a database table along with a TIMESTAMP field with value of current date and time. Before, the time difference of the MIME message LocalDate or EmailDate compare to the TIMESTAMP field is only in seconds or hours. But now, they're differ in months.

Actual record in the database TIMESTAMP Field: 06/07/2013 09:23 AM

Chilkat LocalDate or EmailDate value return: 05/18/2013 07:15 AM

Is there other property that returns the actual date when the MIME was created?


Make sure you're testing with the latest version. Also, if the latest version is a problem, make sure to post a code snippet that show exactly how to reproduce the problem.

When a new email object instance is created, it should by-default be initialized with a Date header that contains the current system date/time. I think it would be unlikely that it's in error, because if it was, Chilkat would be receiving hundreds of problem reports about it. (I'm not saying it's not possible -- any bug is possible -- just highly unlikely...)


This is a rare case I guess, but, I tried to extend my research and ended with this similar case in the FireMail component, which I believe is also a bug in the Chilkat component:

FireMail Wrong send date -

Actually, our client is running the email program through a microsoft hosting from Illinois with timezone in CST. The hosted server time zone in another country is in (UTC -08:00) Pacific Time (US & Canada). I don't think this in an issue between time zones because the difference is in months. It might be related to the regional settings.

I think this problem is common in any email component when adapting to regional settings and timezone, and might also be a bug inside the chilkat component.

Below is the snippet of the code that we've used in our VB.Net application:

-- Creating MIME header --

Dim chilkatMHT As New Chilkat.Mht
in some portion of the project we are also calling the GetMime function to generate the header

-- Reading MIME message (with header and body) --

Dim emailMessage As New Chilkat.Email
emailMessage.SetFromMimeText(mimeMessage) <-- mimeMessage - saved mime message in the database

emailMessage.LocalDate #5/18/2013 11:15:29 PM# Date

emailMessage.EmailDate #5/18/2013 3:15:29 PM# Date

-- TIMESTAMP fields:

datecreated : 2013-06-17 09:23:00.947

datemodified: 2013-06-17 09:23:00.947

-- This is what it looks in the MIME header --

MIME-Version: 1.0
Date: Sat, 18 May 2013 08:15:29 -0700

--We've used ChilkatDotNet4.dll version for this


According to your information, the mimeMessage is a string that comes from the database. Therefore, the date/time for the email comes from the Date header in mimeMessage.

What originally created mimeMessage? You haven't shown me this.

Also, please show the actual header contained within mimeMessage that contains the Date header field. It's most likely that the date/time string found in the Date header is not formatted correct according to RFC822 standards.


To clarify my message above, the mime message with complete header and body is generated only by the code below:

Dim chilkatMHT As New Chilkat.Mht


And we access the "Date:" value inside of the mimeMessage by calling the LocalDate or EmailDate properties, and then compared those values to our OWN date fields in the table (datecreated or datemodified)

Below is a more detail mime message with a complete header and body. Note that I replaced the confidential info with ???:

MIME-Version: 1.0

Date: Sat, 18 May 2013 08:15:29 -0700

Message-ID: ???

X-Priority: 3 (Normal)

Subject: ???

To: ???

Content-Type: multipart/mixed;


MessageCode: 2g466678-4547-5421-4g51-2334frfger22

From: ???

Return-Path: ???

Reply-To: ???

OriginalMessageCode: 4534534f-3423-123d-1111-1111eereeree

This is a multi-part message in MIME format.


Content-Type: text/plain

Content-Transfer-Encoding: quoted-printable