Recently i've import many emails from another system to drupal using support module,
The problem is support module does not preserve email dates and uses the current time for setting ticket time
Is there any option , hook ,etc to alter this behavior and use mail's send time instead?

CommentFileSizeAuthor
#2 from_mail_time.patch5.9 KBsinasalek

Comments

sinasalek’s picture

Same here, i'm importing many old email into the ticket system however their create time is current time and that cause trouble. Also if for any reason support can't fetch mail for a while and then it does all ticket time will become incorrect. support team may think that they answered the ticket within the expected time but there actually late for more than a day

sinasalek’s picture

Status: Active » Needs review
StatusFileSize
new5.9 KB

Here is the patch, I've also added new option to settings page, it's disabled by difficult , but personally i think it should be on by default since i think it's very important for support staff to know when the email has actually been sent rather than when it's been fetched.
If support can't understand the date format of the mail it register an error log and uses the current time.
admin/support/settings : "Use mails send time for tickets and tickets's comments"

sinasalek’s picture

Version: 6.x-1.x-dev » 7.x-1.0-rc1

Patch is against 7.x-1.0-rc1

jeremy’s picture

Assigned: Unassigned » jeremy

The reason the module currently doesn't respect the mail header is because the mail header is set by the mail client's clock, and there's no guarantee this is accurate; it is often far in the future or far in the past. That said, you've implemented this as optional, so it's quite likely I'll merge -- I'll review closer shortly.

purencool’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)