Author |
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 09 November 2008 at 2:31am | IP Logged
|
|
|
During objMessage.ImportRelatedFiles(MailBee.Mime.ImportRelatedFile sOptions.ImportFromUris) I get "The path is not of a legal form."
The path is as follows: "src="/PukFin/ImageServer.aspx?ImageFileName=a_moments_thoug ht_a.jpg&ImagePath=InLine"
The path is image ImageServer.aspx file is picking from the folder away from application. It shows fine in the browser. I tried with "../../ImageServer.aspx?ImageFileName=a_moments_thought_a.jp g&ImagePath=InLine" and the result is the same. It works fine if I use links of type: "http://www.afterlogic.com/img/logo7.png", but this kind of links is not acceptable for my application.
Could you please let me know the workaround or implement solution for this in your code?
Regards,
Alex
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 09 November 2008 at 8:55pm | IP Logged
|
|
|
It works fine with complete URL as:
src="http://www.MyDomain.com/PukFin/ImageServer.aspx?ImageFi leName=a_moments_thought_a.jpg&ImagePath=InLine", so above problem can be solved with converting URL to required format.
Another problem:
When accessing ImageServer.aspx during ImportRelatedFiles (picking in-line attachments), MailBee component not send authentication cookie, which means user info is not accessible (membership and profile info). This is a big dissadvantage. Any workarounds here?
Alex
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 November 2008 at 4:24am | IP Logged
|
|
|
We've recently implemented a few fixes which affect this functionality. Try to update your MailBee.NET.dll to the latest version.
If this doesn't help, please provide us with any email message which fails to be processed correctly.
Regards,
Igor
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 10 November 2008 at 7:52pm | IP Logged
|
|
|
I think you did not understand what the problem is. I will try again:
Brand new email with InLine attachment (image) linked as <IMG src="http://www.MyDomain.com/ImageServer.aspx?ImageFileName= image.jpg" alt=""/>.
During process of attaching InLine attachments (ImportRelatedFiles), MailBee MIME trys to download image by using plain request to ImageServer.aspx file, without sending any membership information. This is unnacepted as user information is used to decide where the image is. Similar approach is used in your SaveMessageAndRelatedFiles.
I use this in forming Replay or forward HTMLBody. Lets say images are unpacked using SaveMessageAndRelatedFiles to unaccessible folder where only file ImageServer.aspx can read them from. All HTML content gets put in edit box on web page. Then user adds some content to the edit box. Then all HTML from edit box get assigned to HTMLBody of the new message. Then the new message gets sent. During the including InLine attachments, MailBee MIME sends request to ImageServer.aspx file to download images. As it is sending request without any user information, ImageServer.aspx is not able to find the file and throws error.
Alex
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 10 November 2008 at 11:41pm | IP Logged
|
|
|
Anoder problem:
Lets say you are adding the image to the blank email message. Image location is src="http://www.MyDomain.com/ImageServer.aspx?ImageName=Some String&SomethingElse=SomeOtherString"
Download InLine attachments into the message (ImportRelatedFiles) and send message.
Receive it in Outlook (or any other email client)
InLine attachment will appear as file attachment and will have name like "ImageName=SomeString&SomethingElse=SomeOtherString.DAT"
I consider this a bug. Please test and let me know the workaround.
Alex
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 10 November 2008 at 11:50pm | IP Logged
|
|
|
We'll try to reproduce and investigate the issues.
Best regards,
Andrew
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 11 November 2008 at 2:55am | IP Logged
|
|
|
Thanks Andrew, please ignore DAT extension as it was my error. Image name in email client is the same as the name of the aspx page + query string. This is one example of image name:
ImageServer.aspx_ImageFileName=8AdQ8wjq%2f2dzC%2b1m02G%2fl1P bt84CWcEuuTO85uzIjb7iOrK5xNebeAKfOcjVqoaYCcjuWImiCF0Sp3fMU86 5fHyuBws5ZC57e2HbimSz77o%3d&ImagePath=Full
Note that question mark (?) is changed to underscore (_) for some reason.
Also attachment has IsFile and IsInLine properties set to true, regardless of the fact it is included as InLine only. Is this by design?
Alex
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 11 November 2008 at 6:39pm | IP Logged
|
|
|
Please read GetHtmlAndSaveRelatedFiles instead of SaveMessageAndRelatedFiles in my third post.
Alex
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 13 November 2008 at 6:03am | IP Logged
|
|
|
There are four issues according to the info below:
1. Objects with relative URLs (without http://www.domain.com) are not imported.
2. Filenames are taken from URLs (/ImageServer.aspx?ImageFileName=a_moments_thought_a.jpg&Ima gePath=InLine)
Both the issues are fixed. Updated MailBee.NET.dll available here.
However, your ImageServer.aspx should generate "Content-Disposition: inline; filename=a_moments_thought_a.jpg" header, otherwise, there's no place to obtain filename from.
3. IsInline and IsFile are true simultaneously.
Yes, that's by design. If the filename parameter of Content-Disposition header is not empty, attachment is considered to be a file.
4. Cookies are not stored and not passed to web server.
MailBee.NET Objects is not a web browser, so cookies are not supported.
Best regards,
Andrew
|
Back to Top |
|
|