Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: lite+pro 6.3.8 Content-Disposition Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
sashaman
Newbie
Newbie


Joined: 31 January 2012
Location: Austria
Online Status: Offline
Posts: 3
Posted: 31 January 2012 at 12:07pm | IP Logged Quote sashaman

dear community,

i'm encountering a problem with messages containing pdf attachments that are defined as

      Content-Type: application/pdf;
      name="xyz.pdf"
      Content-Transfer-Encoding: base64
      Content-Disposition: inline;
      filename="xyz.pdf"

in that they do not show up at all, not inline nor as attachment.
honestly i don't know if thats standard or not, but it's VITAL to access the pdf in any way.
i tried various webmails, apart from the standard online ones (gmail yahoo etc.) i tested roundcube, squirrelmail, communigate's own webmail, and they all offered me one or another way to see/download the attachment.

i tested with AL lite and pro, neither one "works", log:


WORKING:
Code:
[19:16:23.37] IMAP4 > FTC3549 UID FETCH 4553 (FLAGS UID RFC822.SIZE BODYSTRUCTURE)
[19:16:23.37] IMAP4 < * 618 FETCH (FLAGS (\Seen) UID 4553 RFC822.SIZE 130646 BODYSTRUCTURE (((("text" "plain" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 522 50 NIL NIL NIL NIL)("text" "html" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 4039 96 NIL NIL NIL NIL) "alternative" ("boundary" "----=_NextPart_002_005B_01CCE014.F458F4A0") NIL NIL NIL)("image" "jpeg" ("name" "image001.jpg") "image001.jpg@01CCE014.F39CD090" NIL "base64" 6172 NIL NIL NIL NIL) "related" ("boundary" "----=_NextPart_001_005A_01CCE014.F458F4A0") NIL NIL NIL)("application" "pdf" ("name" "R025138.pdf") NIL NIL "base64" 117358 NIL ("attachment" ("filename" "R025138.pdf")) NIL NIL) "mixed" ("boundary" "----=_NextPart_000_0059_01CCE014.F458F4A0") NIL NIL NIL))\r\n
[19:16:23.37] IMAP4 < FTC3549 OK completed\r\n


[19:16:36.41] IMAP4 > FTC3067 UID FETCH 4545 (FLAGS UID RFC822.SIZE BODYSTRUCTURE)
[19:16:36.42] IMAP4 < * 610 FETCH (FLAGS (\Seen) UID 4545 RFC822.SIZE 125316 BODYSTRUCTURE (("text" "plain" NIL NIL NIL "8bit" 5317 136 NIL NIL NIL NIL)("application" "octet-stream" ("name" "agb.pdf") NIL NIL "base64" 113384 NIL ("attachment" ("filename" "agb.pdf")) NIL NIL) "mixed" ("boundary" "327E0139D2D39720D204DB6B37E3D938") NIL NIL NIL))\r\n
[19:16:36.42] IMAP4 < FTC3067 OK completed\r\n



not working(pfd attachment doesn't show up in webmail, not inline nor as attachment icon):
Code:
[19:16:27.58] IMAP4 > FTC3721 UID FETCH 4551 (FLAGS UID RFC822.SIZE BODYSTRUCTURE)
[19:16:27.58] IMAP4 < * 616 FETCH (FLAGS (\Seen $MDNSent) UID 4551 RFC822.SIZE 65989 BODYSTRUCTURE ((("text" "plain" ("charset" "iso-8859-1" "format" "flowed") NIL NIL "8bit" 609 33 NIL NIL NIL NIL)("text" "html" ("charset" "iso-8859-1") NIL NIL "7bit" 1826 59 NIL NIL NIL NIL) "alternative" ("boundary" "------------040109020403080701090304") NIL NIL NIL)("application" "pdf" ("name" "BizHub22220120131090946.pdf") NIL NIL "base64" 61744 NIL ("inline" ("filename" "BizHub22220120131090946.pdf")) NIL NIL) "mixed" ("boundary" "------------070205030608080008060302") NIL NIL NIL))\r\n
[19:16:27.58] IMAP4 < FTC3721 OK completed\r\n


[19:16:33.07] IMAP4 > FTC5893 UID FETCH 4550 (FLAGS UID RFC822.SIZE BODYSTRUCTURE)
[19:16:33.07] IMAP4 < * 615 FETCH (FLAGS (\Seen $MDNSent) UID 4550 RFC822.SIZE 68285 BODYSTRUCTURE (("text" "plain" ("charset" "iso-8859-1" "format" "flowed") NIL NIL "8bit" 360 19 NIL NIL NIL NIL)("application" "pdf" ("name" "BSS06-1_AN2196163_1151.pdf") NIL NIL "base64" 66364 NIL ("inline" ("filename" "BSS06-1_AN2196163_1151.pdf")) NIL NIL) "mixed" ("boundary" "------------000804010509080301020202") NIL NIL NIL))\r\n
[19:16:33.07] IMAP4 < FTC5893 OK completed\r\n



now is there any (easy) way to "fix" this BESIDES reformatting the email itself? :)

thx in advance and kindest regards,
sash
Back to Top View sashaman's Profile Search for other posts by sashaman
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6089
Posted: 01 February 2012 at 12:29am | IP Logged Quote Igor

Currently, WebMail Pro would not show attachments in the list of those if they're marked as inline, and if there's an inline object not included into HTML body it will not be displayed at all. Of course, other clients might behave differently in such situations. And there are might be different workarounds.

Developers have provided a fix for the situation when HTML part is too small so that it can't possibly contain any inline content. To add the fix, please locate the following code in application/xml-builder.php file:

Code:
$sHtmlPart = '';
  if (($iMode & 2) == 2 && ($iMessageClassType & 2) == 2)
  {
   $sHtmlPart = ConvertUtils::ReplaceJSMethod(
    $oMessage->GetCensoredHtmlWithImageLinks(true, $oMessageInfo));

   if (!$bShowImages)
   {
    $sHtmlPart = ConvertUtils::HtmlBodyWithoutImages($sHtmlPart);
    if (isset($GLOBALS[GL_WITHIMG]) && $GLOBALS[GL_WITHIMG])
    {
     $GLOBALS[GL_WITHIMG] = false;
     $bSafety = false;
    }
   }
  }
  
  $bHtmlIsShort = 10 > strlen(trim($sHtmlPart));


The last line of that code block is not in the original code and should be added there. Then, locate the line:

Code:
$oAttachmentNode->AppendAttribute('inline', ($oAttachment->IsInline) ? '1': '0');


and replace it with:

Code:
$oAttachmentNode->AppendAttribute('inline',
      ($oAttachment->IsInline && !$bHtmlIsShort) ? '1': '0');


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6089
Posted: 01 February 2012 at 4:14am | IP Logged Quote Igor

If that doesn't work for you, there's another option - make sure that every attachment is presented in attachments list, even if the particular one is actually inline one and is rendered in HTML part of email message. To add this fix, modify the code line in application/xml-builder.php file so that it looks like:

Code:
$oAttachmentNode->AppendAttribute('inline', '0');


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
sashaman
Newbie
Newbie


Joined: 31 January 2012
Location: Austria
Online Status: Offline
Posts: 3
Posted: 01 February 2012 at 4:35am | IP Logged Quote sashaman

lifesaver one, you made my day!

i prefer the 2nd one, nice to have attachment buttons also for (shown or not) inline objects.

Thank you Igor,
kindest regards
sash
Back to Top View sashaman's Profile Search for other posts by sashaman
 
sashaman
Newbie
Newbie


Joined: 31 January 2012
Location: Austria
Online Status: Offline
Posts: 3
Posted: 01 February 2012 at 6:00am | IP Logged Quote sashaman

just for "cosmetic" reasons...
where would i have to look for similiar code to see the attachments after double-klicking (in mini-webmail.php)?
currently both ways you mentioned only work in the preview pane

thx in advance,
sash
Back to Top View sashaman's Profile Search for other posts by sashaman
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6089
Posted: 01 February 2012 at 6:27am | IP Logged Quote Igor

Yes, that would be mini-webmail.php file. Locate the following line there:

Code:
$attachArray['inline'] = (bool) $_attachment->IsInline;


and replace it with:

Code:
$attachArray['inline'] = false;


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide