Skip to content

attachments not sent using composemailform.tpl

Example: use the menu action in quote module "send pdf quote via email", mail is sent without attachment.

Since vtiger 8.x you can't send attachments passing them calling composemailform.tpl because attachments are wrongly encoded.

The reason for this is json encode fails because "" are used instead of '' (as was in vtiger 7.5)   **layouts/v7/modules/Vtiger/ComposeEmailForm.tpl **

<!--wrong way-->
                    <input type="hidden" name="attachments" value="{if isset($ATTACHMENTS)}{ZEND_JSON::encode($ATTACHMENTS)}{else}null{/if}" />

<!--right way-->
<input type="hidden" name="attachments" value='{if isset($ATTACHMENTS)}{ZEND_JSON::encode($ATTACHMENTS)}{else}null{/if}' />