ABWebSolutions Posted March 11, 2019 Share Posted March 11, 2019 Hi, i'd like send automatically from WHMCS a mail at my customers after that they have create the invoice. I have set the automatic mail from the Installation > Product / Service > Open the service and choose the welcome mail but it doesn't work, there are these Log errors: ________________ Email Sending Failed - Email message rendered empty - please check the email message Smarty markup syntax (Subject: Benvenuto su ABWebSolutions) Smarty Error: Syntax error in template "mailMessage:mailMessage:plaintext" on line 2 "{/php}Gentile {$ client_first_name}," too many shorthand attributes Smarty Error: Syntax error in template "mailMessage:mailMessage:plaintext" on line 2 "{/php}Gentile {$ client_first_name}," too many shorthand attributes ________________ I have check into the html code but i haven't found nothing error, there isn't not even the empty space into the code {$client_first_name}, please could you help me? Thanks and have a nice day Andrea of SoluzioniPEC 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 12, 2019 Share Posted March 12, 2019 What is in the email template exactly? Seems to have php in it also, so do you have the smarty php setting set in the security tab (IIRC) of general settings? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted March 12, 2019 Share Posted March 12, 2019 @ABWebSolutions Try copying the code, removing it, save and then re-enter it back in again and save to see if this helps 0 Quote Link to comment Share on other sites More sharing options...
ABWebSolutions Posted March 12, 2019 Author Share Posted March 12, 2019 Hi @steven99 and @WHMCS ChrisD, thank you for the support, anyway the PHP Smarty Tag info the Security tab is disabled and i have tried to delete and copy again the mail text but the problem hasn’t been solved. Anyway i have solved the problem editing there mails that do sent automatically at the order’s confirm: - Order Confirmation - Invoice Created I have another question, into the Log Activity i have this problem: Smarty Error: Syntax error in template "file:/home/user/public_html/abwebsolutions.it/area-clienti/templates/six/footer.tpl" on line 19 "function gtag(){dataLayer.push(arguments);}" - Unexpected ".", expected one of: "}" Let me know, thanks for the collaboration and have a nice evening. Best regards Andrea 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 13, 2019 Share Posted March 13, 2019 19 hours ago, ABWebSolutions said: I have another question, into the Log Activity i have this problem: have you added Google Tag Manager to your WHMCS site somewhere ? 0 Quote Link to comment Share on other sites More sharing options...
ABWebSolutions Posted March 14, 2019 Author Share Posted March 14, 2019 Hi @brian!, i have added the Google Code into the footer.tpl. However i continue to receive ever this error: Smarty Error: Syntax error in template "file:/home/user/public_html/abwebsolutions.it/area-clienti/templates/six/footer.tpl" on line 19 "function gtag(){dataLayer.push(arguments);}" - Unexpected ".", expected one of: "}" Thanks, Andrea 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 16, 2019 Share Posted March 16, 2019 You likely need to surround the google code with a {literal}....{/literal} block in order for smarty not to take items like javascript { as items for it. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 16, 2019 Share Posted March 16, 2019 as steven says, it's likely solved by either using literal in the template, or using a footer action hook. 0 Quote Link to comment Share on other sites More sharing options...
ABWebSolutions Posted March 18, 2019 Author Share Posted March 18, 2019 hi, i have tried to put { before the <script> and } after the </script>, is it correct? {<script async src="https://www.googletagmanager.com/gtag/js?id=UA-000000000-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-000000000-1'); </script>} Thanks, Andrea! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 19, 2019 Share Posted March 19, 2019 On 18/03/2019 at 11:07, ABWebSolutions said: hi, i have tried to put { before the <script> and } after the </script>, is it correct? if it needs {literal} tags, then I suspect it should be.. {literal} <script async src="https://www.googletagmanager.com/gtag/js?id=UA-000000000-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-000000000-1'); </script> {/literal} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.