login about faq

I am using the Email object in a .NET 4.5 app with the 9.4 version of the Chilkat Library.

When I unpack the email using the code below the files are created as expected:

email.UnpackUseRelPaths = false;
success = email.UnpackHtml(@"C:\Emails", "test.htm", @"C:\Emails\Resources");

If I look at the HTML source the file paths for the images are absolute irrespective of whether I set UnpackUseRelPaths to true or false. I set this just before calling the UnpckHtml method. I cannot find a sample and the documentation does not give any clues. Is there something I am missing/

Also, if the parts folder does not exist the method fails. Is there a way to get the method to create this folder itself, i.e. something else I may have missed?

asked May 23 '13 at 11:00

KevinD's gravatar image



answered May 24 '13 at 08:39

chilkat's gravatar image

chilkat ♦♦

Thanks for the quick reply and the new DLL. It seems to have worked but I have also found a misunderstanding on my part which may have been the cause of the problem. To illustrate this look at these two lines of code

success = email.UnpackHtml(@"C:\Emails", "test.htm", @"C:\Emails\Resources\");
success = email.UnpackHtml(@"C:\Emails", "test.htm", @"Resources\");

The first line will not create the directories and uses absolute references irrespective of the setting. The second line will both create the directories and use relative paths if set. This is where I probably misunderstood what was needed.


answered May 25 '13 at 05:07

KevinD's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 23 '13 at 11:00

Seen: 657 times

Last updated: May 25 '13 at 05:07

powered by OSQA