1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

[Help] Adding email content to AutoResponder

Discussion in 'Developing, APIs and extending' started by Amitm, Mar 15, 2013.

  1. Priyanka Trivedi

    Priyanka Trivedi Established Member

    Hello Garry,

    For some reason , I am getting the reply mail attached as

    <div dir="ltr">Hello Team,<div><br></div><div>Testing.</div><div>Please ignore.</div><div><br></div><div>Best Regards</div><div>Priyanka</div></div>

    and not as proper html.
    Please let me know in case any suggestions.

    Best Regards
    Priyanka
     
  2. Gary McGrath

    Gary McGrath Staff Member

    Hi there,

    Within the Admin CP, mail parser, settings, is the "Prioritize email content type" set to HTML?

    Gary
     
  3. Priyanka Trivedi

    Priyanka Trivedi Established Member

    Hello Gary,

    It seems like the auto responder email body breaks and contains the html content as shown in the snag.
    Please let me know if any insight in this.
    Thanks alot.

    Best Regards
    Priyanka
     

    Attached Files:

  4. Priyanka Trivedi

    Priyanka Trivedi Established Member

    Within the Admin CP, mail parser, settings, is the "Prioritize email content type" set to HTML?

    Regarding the above, i checked the settings and it is set to HTML only.
    Please let me know.

    Thanks
    Best Regards
    Priyanka
     
  5. Gary McGrath

    Gary McGrath Staff Member

    To me it does not look like broken content, it looks like its added HTML code to a text based email.

    If the HTML had spilled out, it would be somewhere in the middle of the html content, not right at the start

    Gary
     
  6. Priyanka Trivedi

    Priyanka Trivedi Established Member

    Hello Gary,

    It was working fine and now the auto-responder has stopped.
    I am not sure how should i check this.
    I checked Dispatch Auto Responder for CC Users? and it enabled.
    Please let me know how should i debug this.

    Best Regards
    Priyanka
     
  7. Chris Plapp

    Chris Plapp Reputed Member

    Hi Gary,

    I tried to implement this in v4.61 and I am getting the same error reported above:
    Code:
    Notice
    Undefined variable: _lastpostcontents (./__apps/tickets/library/Ticket/class.SWIFT_TicketEmailDispatch.php:416)
    =================================================================================================================================
    
    I double checked that I have the code modified correctly, or at least I think I do. See attached screenshots for the two modifications.
     

    Attached Files:

  8. Chris Plapp

    Chris Plapp Reputed Member

    Disregard - I realized I didn't modify the function to accept the variable.
     
  9. Sylvain Lague

    Sylvain Lague New Member

    Would these changes work on
    Product: [​IMG] eSupport
    Version: 3.60.04
     
  10. Chris Plapp

    Chris Plapp Reputed Member

  11. Gary McGrath

    Gary McGrath Staff Member

    can you upload your modified files here so I can check?

    Gary
     
  12. Chris Plapp

    Chris Plapp Reputed Member

    Thanks in advance Gary. Both are attached and I am currently running v4.63.
     

    Attached Files:

  13. Gary McGrath

    Gary McGrath Staff Member

    Hi Chris,

    Can you confirm which templates you have edited and used <{$_lastpostcontents}> within?

    Gary
     
  14. Chris Plapp

    Chris Plapp Reputed Member

    Sure, I inserted <{$_lastpostcontents}> into the following templates:

    email_ticketautoclosefinalhtml
    email_ticketautoclosefinaltext
    email_ticketautoclosependinghtml
    email_ticketautoclosependingtext
    email_ticketautoresponderhtml
    email_ticketautorespondertext
     
  15. Gary McGrath

    Gary McGrath Staff Member

    Ah ok, that explains it, the modifications I gave are only for the

    email_ticketautoresponderhtml
    email_ticketautorespondertext

    If you use it within these:

    email_ticketautoclosefinalhtml
    email_ticketautoclosefinaltext
    email_ticketautoclosependinghtml
    email_ticketautoclosependingtext

    It will cause that error, do you need the last post contents in the auto close messages?

    Gary
     
  16. Chris Plapp

    Chris Plapp Reputed Member

    Interesting. I guess I could remove it, but we found it helpful because many times customers don't remember why they contacted us when they receive the auto close message.
     
  17. Gary McGrath

    Gary McGrath Staff Member

    Hi Chris,

    Just so its clear, the code I posted never made the lastpostcontents available to those templates, it has only ever done it for the autoresponder.

    Further changes can be made to put the lastpostcontents into those templates too if that's what you wish to do, I can check which changes would be required

    Gary
     
  18. Chris Plapp

    Chris Plapp Reputed Member

    Hi Gary,

    Thanks for the offer, but I think I will just remove it from the unsupported templates for now. I already have a long enough list of changes to go through each time I upgrade Kayako. :)
     
  19. Divider

    Divider Member

    Is there by any chance someone who got this working on a 4.65 installation?
    I tried to get this to work on that version, though when I added the lines, the variable remained empty in the template.

    I could not get any valuable debug information, since it was a production machine, but as far as a var_dump goes, it was empty.

    Did something change in the way Kayako passes its variables through the system, or did I just do something wrong and should this method still work?
     
  20. Gary McGrath

    Gary McGrath Staff Member

    Hi there,

    This should still work fine, so I would lean towards it has been edited incorrectly, can you attach your amended files here?

    Gary
     

Share This Page