Jump to content
ABWebSolutions

Automatic email sending failed

Recommended Posts

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

Share this post


Link to post
Share on other sites

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? 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

as steven says, it's likely solved by either using literal in the template, or using a footer action hook.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
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}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines