Hi,
I convert eml message to xps. In my eml I have date sent: 10/26/2011 2:45 PM
In result xps document I got date sent: 10/26/2011 12:45PM.
I run conversion on remote box, which is in different time zone, so
I guess the dates are converted to UTC format.
Am I correct ? How can I control the process of converting date and time in email ?
Sample files are in attach.
Thanks,
Roman
Hi Roman,
var message = Aspose.Email.Mail.MailMessage.Load(@“SPAM_ test (Inbox).eml”);
var printer = new Aspose.Email.Printing.MailPrinter();
printer.Print(message, “output.xps”, Aspose.Email.Printing.PrintFormat.XPS);
Hi,
Actually I use Aspose.Words for this purpose. First I convert email to mht and then to xps.
Here is my code
using (MailMessage message = MailMessage.Load(documentStream, messageFormat))
{
using (MemoryStream mhtMemoryStream = new MemoryStream())
{
// Save as MHT
message.Save(mhtMemoryStream, MailMessageSaveType.MHtmlFromat);
mhtMemoryStream.SeekToBegin();
var outStream = new MemoryStream();
// Load MHT file
var document = new Document(mhtMemoryStream);
// Accept all revisions in the document.
document.AcceptAllRevisions();
// Convert Document to defined format - ConversionFormat
document.Save(outStream, saveOption);
// set null to doucment
document = null;
return outStream;
}
}
I use this code because I need stream on output.
So, I have two questions:
1)Does Aspose.Email provide ability to convert eml, msg formats directly to xps stream
2)Does sent date is converted to UTC when converting MailMessage to mht
Thanks,
Roman
Hi Roman,
{
var message = Aspose.Email.Mail.MailMessage.Load(“SPAM_ test (Inbox).eml”);
var printer = new Aspose.Email.Printing.MailPrinter();
printer.Print(message, stream, Aspose.Email.Printing.PrintFormat.XPS);
stream.WriteTo(new FileStream(“output.xps”, FileMode.Create));
}
Hi,
Does Aspose.Email.Printing.MailPrinter class perform in-memory conversion or it uses XPS printer installed on Windows ? Because I can use only in-memory conversion.
Yes it would be great if you link this thread to appropriate ticket.
Thanks for reply, waiting for any possible workarounds with setting Sent Date to UTC.
Regards,
Roman
Hi Roman,
- NETWORKNET-33109 is logged earlier to enhance the MailPrinter class to include the email headers in the resultant TIFF/XPS.
- I have logged an investigative ticket for the issue of different “Sent Date” in result when message is converted to MHT format on a remote machine having different Time Zone. The ticket Id for your reference is NETWORKNET-33127. We will keep you posted with updates on this issue.
The issues you have found earlier (filed as NETWORKNET-33109) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Hi Roman,