From c944dd68923cbb8827b20ab0122b8ef8f118c06b Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 28 Sep 2018 13:36:23 +0200 Subject: [PATCH] TT#33108 add faxserver email templates * faxserver templates are migrated from the faxserver.conf into the database Change-Id: I1c85ccba7466a1260029c98e2f7edceaf5ff437a --- db_scripts/diff/15430.down | 13 +++++++ db_scripts/diff/15430.up | 78 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 db_scripts/diff/15430.down create mode 100644 db_scripts/diff/15430.up diff --git a/db_scripts/diff/15430.down b/db_scripts/diff/15430.down new file mode 100644 index 00000000..61a11322 --- /dev/null +++ b/db_scripts/diff/15430.down @@ -0,0 +1,13 @@ +SET autocommit=0; +USE billing; + +DELETE FROM email_templates WHERE name = 'fax_receive_ok_default_email'; +DELETE FROM email_templates WHERE name = 'fax_receive_error_default_email'; +DELETE FROM email_templates WHERE name = 'fax_send_copy_default_email'; +DELETE FROM email_templates WHERE name = 'fax_notify_ok_default_email'; +DELETE FROM email_templates WHERE name = 'fax_notify_error_default_email'; +DELETE FROM email_templates WHERE name = 'fax_notify_secret_update_default_email'; + +ALTER TABLE email_templates DROP attachment_name; + +COMMIT; diff --git a/db_scripts/diff/15430.up b/db_scripts/diff/15430.up new file mode 100644 index 00000000..46896ee1 --- /dev/null +++ b/db_scripts/diff/15430.up @@ -0,0 +1,78 @@ +SET autocommit=0; +USE billing; + +ALTER TABLE email_templates ADD attachment_name VARCHAR(255) NOT NULL DEFAULT ""; + +INSERT INTO email_templates SET +name = 'fax_receive_ok_default_email', +from_email = 'Sipwise NGCP FaxServer ', +subject = 'Incoming fax from [% caller %]', +attachment_name = 'Fax_from_[% caller %]_at_[% date_file %]', +body = +' New fax received: + + Status: [% status %] + From: [% caller %] + To: [% callee %] + Pages: [% pages %] + Date: [% date %] + +-- +Please do not reply to this auto-generated E-Mail.'; + +INSERT INTO email_templates SET +name = 'fax_send_copy_default_email', +from_email = '[% mail_from %]', +subject = 'Copy of an outgoing fax to [% callee %]', +attachment_name = 'Fax_from_[% caller %]_at_[% date_file %]', +body = +' Copy of the sent fax: + + From: [% caller %] + To: [% callee %] + Pages: [% pages %] + +-- +Please do not reply to this auto-generated E-Mail.'; + +INSERT INTO email_templates SET +name = 'fax_notify_ok_default_email', +from_email = '[% mail_from %]', +subject = 'Fax transmission to [% callee %] is successful', +body = +' Fax from [% caller %] to [% callee %] has been successfully sent. + + Pages: [% pages %] + Quality: [% quality %] + +-- +Please do not reply to this auto-generated E-Mail.'; + +INSERT INTO email_templates SET +name = 'fax_notify_error_default_email', +from_email = '[% mail_from %]', +subject = 'Fax transmission to [% callee %] has failed', +body = +' Fax from [% caller %] to [% callee %] has failed. + + Status: [% status %] + Attempts: [% attempts %] + Sent pages: [% sent_pages %] of [% pages %] + Reason: [% reason %] + +-- +Please do not reply to this auto-generated E-Mail.'; + +INSERT INTO email_templates SET +name = 'fax_notify_secret_update_default_email', +from_email = '[% mail_from %]', +subject = 'Preferences update notification', +body = +' Secret key for subscriber [% subscriber %] has been updated. + + New secret key: [% secret_key %] + +-- +Please do not reply to this auto-generated E-Mail.'; + +COMMIT;