Email template text

willy Lafort

Member
Mar 5, 2017
30
1
8
65
Hell;
Where are the email template text is located, I'd like to edit password reset and missing call text to a different one..
Thank You..
I've checked (app/email_templates/email_template_edit.php), but looks like the wording is different from what is sent out by fspbx
 
Last edited:
For now they are stored here:

/var/www/fspbx/resources/views/emails

This will change soon. There have been a lot of requests to make this simpler.
 
  • Like
Reactions: yaboc
@willy Lafort Heads up, version 1.9.6 now includes a brand new Email Template page where you can create a copy and override any default templates.
This is a breaking change. Because templates under /var/www/fspbx/resources/views/emails will no longer be used.

You will need to
Code:
git stash
your template changes before the update and apply them using the new Email Template page. Navigate to Advanced-> Email Templates

If you land on the old page, log out and log back in. The menu is cached and gets rebuilt during login.
 
@willy Lafort Heads up, version 1.9.6 now includes a brand new Email Template page where you can create a copy and override any default templates.
This is a breaking change. Because templates under /var/www/fspbx/resources/views/emails will no longer be used.

You will need to
Code:
git stash
your template changes before the update and apply them using the new Email Template page. Navigate to Advanced-> Email Templates

If you land on the old page, log out and log back in. The menu is cached and gets rebuilt during login.
thanks for this great update @pbxgeek

i updated my HA cluster to 1.9.6. When I create custom template on serverA it gets replicated on serverB. However when i delete it on serverB it doesn't get deleted on ServerA. When i create template on serverB it doesn't get replicated on serverA. i've tested extension name changes and those update both ways.
 
@yaboc, that means you might have an issue with database replication. Our update guide specifically outlines how to perform updates and database migrations for redundant servers. You might have missed a step. Postgres log can confirm that
 
@yaboc, that means you might have an issue with database replication. Our update guide specifically outlines how to perform updates and database migrations for redundant servers. You might have missed a step. Postgres log can confirm that

thanks @pbxgeek i followed the same upgrade procedure and everything appeared to be working up until 1.9.6
this is what im getting on 1.9.6 in postgres log

Code:
2026-07-24 01:15:34.349 UTC [68019] CONTEXT:  COPY email_templates, line 21

2026-07-24 01:15:34.352 UTC [189] LOG:  background worker "logical replication tablesync worker" (PID 68019) exited with exit code 1

2026-07-24 01:15:34.355 UTC [68023] LOG:  logical replication table synchronization worker for subscription "fspbx_subscription_b_to_a", table "email_templates" has started

2026-07-24 01:15:40.684 UTC [68023] ERROR:  duplicate key value violates unique constraint "email_templates_pkey"

2026-07-24 01:15:40.684 UTC [68023] DETAIL:  Key (email_template_uuid)=(04d94d2e-238a-4c6a-b38f-3b103e528337) already exists.

rolled back to 1.9.5

and db replication seems to be wroking
serverA
Code:
2026-07-24 01:53:27.569 UTC [734] LOG:  logical replication apply worker for subscription "fspbx_subscription_b_to_a" has started
2026-07-24 01:56:01.113 UTC [243] LOG:  checkpoint starting: time
2026-07-24 01:56:01.745 UTC [243] LOG:  checkpoint complete: wrote 8 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.608 s, sync=0.008 s, total=0.633 s; sync files=6, longest=0.004 s, average=0.002 s; distance=16 kB, estimate=16 kB; lsn=0/C9046110, redo lsn=0/C90460B8
2026-07-24 02:01:01.845 UTC [243] LOG:  checkpoint starting: time
2026-07-24 02:01:02.374 UTC [243] LOG:  checkpoint complete: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.508 s, sync=0.007 s, total=0.530 s; sync files=6, longest=0.003 s, average=0.002 s; distance=14 kB, estimate=16 kB; lsn=0/C9049C98, redo lsn=0/C9049C40

serverB
Code:
2026-07-24 01:53:27.702 UTC [763] fusionpbx@fusionpbx DETAIL:  There are no running transactions.
2026-07-24 01:53:27.702 UTC [763] fusionpbx@fusionpbx STATEMENT:  START_REPLICATION SLOT "fspbx_subscription_b_to_a" LOGICAL 0/CAEC9480 (proto_version '4', origin 'none', publication_names '"fspbx_publication_b"')
2026-07-24 01:56:17.021 UTC [363] LOG:  checkpoint starting: time
2026-07-24 01:56:17.844 UTC [363] LOG:  checkpoint complete: wrote 1 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.101 s, sync=0.241 s, total=0.823 s; sync files=1, longest=0.241 s, average=0.241 s; distance=3 kB, estimate=3 kB; lsn=0/CAEDF960, redo lsn=0/CAEDF908
2026-07-24 02:01:17.936 UTC [363] LOG:  checkpoint starting: time
2026-07-24 02:01:20.609 UTC [363] LOG:  checkpoint complete: wrote 9 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.855 s, sync=1.294 s, total=2.673 s; sync files=7, longest=0.852 s, average=0.185 s; distance=17 kB, estimate=17 kB; lsn=0/CAEE4060, redo lsn=0/CAEE3FB8

is the addition of the new tables creating an issue ?
email_templates_pkey table seems to be the culprit here with its primary key column.

with the latest tables added in 1.9.4 related to phonebooks i can create/delete/replicate both ways just fine.
any pointers would be helpful in getting it resolved.
 
Last edited:
@yaboc Thank you for the detailed example. I found the bug and committed a fix. Please go ahead and try updating again.

For anyone else who updated prior to this fix and experiences the same issue, here is how to fix it.

Run these commands on both servers:

Code:
su postgres
psql fusionpbx
TRUNCATE TABLE public.email_templates;
 
  • Like
Reactions: yaboc
@yaboc Thank you for the detailed example. I found the bug and committed a fix. Please go ahead and try updating again.

For anyone else who updated prior to this fix and experiences the same issue, here is how to fix it.

Run these commands on both servers:

Code:
su postgres
psql fusionpbx
TRUNCATE TABLE public.email_templates;
Thanks @pbxgeek. Upgraded again to 1.9.6 and everything works beautifully!