Customize automatic email subject

Hello,

We are creating a Zammad ticket programatically using API endpoint. Once the ticket is created Zammad sends automatic email to the admins and the customer.

The email’s subject is in this format:
New Ticket ([TICKET_TITLE]) [Ticket#TICKET_NUMBER]. Now we want to change the format to something like, [TTN#TICKET_NUMBER] removing the prefix before ticket number totally. I have played around with Triggers but without any success.

Can anyone give me hint on how to achieve this?

Thanks in advance!

You can change this in the admin section under Settings → Ticket → Ticket Hook

Thanks for your help. Your solution solved half of my problem. It helped formatting [Ticket#TICKET_NUMBER] part but I need to remove New Ticket ([TICKET_TITLE]) whole part from New Ticket ([TICKET_TITLE]) [Ticket#TICKET_NUMBER].

Do you have any idea how other part of the email subject can be customized?

This depends. If you want to customize the subject of the auto reply e-mail the customer receives you have to edit the corresponding trigger.
To edit the notification e-mails your agents receive you can navigate to /opt/zammad/app/views/mailer and then the subfolder for each mail you whish to customize. For every language there is a template file. Don’t modify the existing files, make a copy of the language you want to edit and name it .custom like en.html.erb.custom. This custom file can be modified to your liking and will be update safe. The first line of the file contains the e-mail subject you are looking to change, but you can change the body too.

Thank you for the hint, I will try that out and update here how it goes.

1 Like

To customise the title number format this worked:

And for other part of the subject, adding .custom file in the mailer folder worked.

Thank you @awedor

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.