messages-to-email (#7193)

This commit is contained in:
anthony-ricci 2024-12-09 12:10:15 -05:00 committed by GitHub
parent e1cfb7931e
commit 7993e2ad1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 97 additions and 0 deletions

View File

@ -167,6 +167,10 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_local";
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_email";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
//default settings
$y = 0;
@ -397,6 +401,10 @@
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_email";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to send email notifications of incoming SMS/MMS messages";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';

View File

@ -1162,6 +1162,32 @@ $text['label-destination_conditions']['zh-cn'] = "状况";
$text['label-destination_conditions']['ja-jp'] = "条件";
$text['label-destination_conditions']['ko-kr'] = "정황";
$text['label-destination_email']['en-gb'] = "Email Notifications";
$text['label-destination_email']['ar-eg'] = "إشعارات البريد الإلكتروني";
$text['label-destination_email']['de-at'] = "E-Mail-Benachrichtigungen";
$text['label-destination_email']['de-ch'] = "E-Mail-Benachrichtigungen";
$text['label-destination_email']['de-de'] = "E-Mail-Benachrichtigungen";
$text['label-destination_email']['el-gr'] = "Ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου";
$text['label-destination_email']['es-cl'] = "Notificaciones por correo electrónico";
$text['label-destination_email']['es-mx'] = "Notificaciones por correo electrónico";
$text['label-destination_email']['fr-ca'] = "Notifications par courriel";
$text['label-destination_email']['fr-fr'] = "Notifications par e-mail";
$text['label-destination_email']['he-il'] = "התראות דוא\"ל";
$text['label-destination_email']['it-it'] = "Notifiche via email";
$text['label-destination_email']['ka-ge'] = "ელ.ფოსტით შეტყობინებები";
$text['label-destination_email']['nl-nl'] = "E-mailmeldingen";
$text['label-destination_email']['pl-pl'] = "Powiadomienia e-mail";
$text['label-destination_email']['pt-br'] = "Notificações por e-mail";
$text['label-destination_email']['pt-pt'] = "Notificações por e-mail";
$text['label-destination_email']['ro-ro'] = "Notificări prin e-mail";
$text['label-destination_email']['ru-ru'] = "Уведомления по электронной почте";
$text['label-destination_email']['sv-se'] = "E-postmeddelanden";
$text['label-destination_email']['uk-ua'] = "Повідомлення електронною поштою";
$text['label-destination_email']['tr-tr'] = "E-posta Bildirimleri";
$text['label-destination_email']['zh-cn'] = "邮件通知";
$text['label-destination_email']['ja-jp'] = "メール通知";
$text['label-destination_email']['ko-kr'] = "이메일 알림";
$text['option-caller_id_number']['en-us'] = "Caller ID Number";
$text['option-caller_id_number']['en-gb'] = "Caller ID Number";
$text['option-caller_id_number']['ar-eg'] = "رقم المتصل";
@ -2352,6 +2378,32 @@ $text['description-usage']['zh-cn'] = "设置目的地的使用方式。";
$text['description-usage']['ja-jp'] = "宛先の使用方法を設定します。";
$text['description-usage']['ko-kr'] = "대상이 사용되는 방식을 설정합니다.";
$text['description-destination_email']['en-gb'] = "Choose whether to send SMS and MMS messages to User's email";
$text['description-destination_email']['ar-eg'] = "اختر ما إذا كنت ترغب في إرسال رسائل SMS و MMS إلى بريد المستخدم الإلكتروني";
$text['description-destination_email']['de-at'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen";
$text['description-destination_email']['de-ch'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen";
$text['description-destination_email']['de-de'] = "Wählen Sie, ob SMS- und MMS-Nachrichten an die E-Mail des Benutzers gesendet werden sollen";
$text['description-destination_email']['el-gr'] = "Επιλέξτε αν θέλετε να στείλετε μηνύματα SMS και MMS στο email του χρήστη";
$text['description-destination_email']['es-cl'] = "Elija si desea enviar mensajes SMS y MMS al correo electrónico del usuario";
$text['description-destination_email']['es-mx'] = "Elija si desea enviar mensajes SMS y MMS al correo electrónico del usuario";
$text['description-destination_email']['fr-ca'] = "Choisissez si vous souhaitez envoyer des messages SMS et MMS à l'email de l'utilisateur";
$text['description-destination_email']['fr-fr'] = "Choisissez si vous souhaitez envoyer des messages SMS et MMS à l'email de l'utilisateur";
$text['description-destination_email']['he-il'] = "בחר אם לשלוח הודעות SMS ו-MMS לדוא\"ל של המשתמש";
$text['description-destination_email']['it-it'] = "Scegli se inviare messaggi SMS e MMS all'email dell'utente";
$text['description-destination_email']['ka-ge'] = "აირჩიეთ, გსურთ თუ არა SMS და MMS შეტყობინებების გაგზავნა მომხმარებლის ელ.ფოსტაზე";
$text['description-destination_email']['nl-nl'] = "Kies of je SMS- en MMS-berichten naar de e-mail van de gebruiker wilt sturen";
$text['description-destination_email']['pl-pl'] = "Wybierz, czy chcesz wysłać wiadomości SMS i MMS na adres e-mail użytkownika";
$text['description-destination_email']['pt-br'] = "Escolha se deseja enviar mensagens SMS e MMS para o e-mail do usuário";
$text['description-destination_email']['pt-pt'] = "Escolha se deseja enviar mensagens SMS e MMS para o e-mail do usuário";
$text['description-destination_email']['ro-ro'] = "Alegeți dacă doriți să trimiteți mesaje SMS și MMS la adresa de e-mail a utilizatorului";
$text['description-destination_email']['ru-ru'] = "Выберите, хотите ли вы отправлять SMS и MMS сообщения на электронную почту пользователя";
$text['description-destination_email']['sv-se'] = "Välj om du vill skicka SMS- och MMS-meddelanden till användarens e-post";
$text['description-destination_email']['uk-ua'] = "Виберіть, чи хочете ви надсилати SMS і MMS повідомлення на електронну пошту користувача";
$text['description-destination_email']['tr-tr'] = "Kullanıcının e-posta adresine SMS ve MMS mesajları gönderilip gönderilmeyeceğini seçin";
$text['description-destination_email']['zh-cn'] = "选择是否将SMS和MMS消息发送到用户的电子邮件";
$text['description-destination_email']['ja-jp'] = "ユーザーのメールにSMSおよびMMSメッセージを送信するかどうかを選択してください";
$text['description-destination_email']['ko-kr'] = "사용자 이메일로 SMS 및 MMS 메시지를 보낼지 선택하세요";
$text['billing-warning']['en-us'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables.";
$text['billing-warning']['en-gb'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables.";
$text['billing-warning']['ar-eg'] = "إذا كنت تستخدم تطبيق فواتير الدمج، تأكد من إضافة رمز الحساب والمتغيرات الناقلة.";

View File

@ -130,6 +130,7 @@
$destination_type_text = $_POST["destination_type_text"] ?? null;
$destination_type_emergency = $_POST["destination_type_emergency"] ?? null;
$destination_carrier = $_POST["destination_carrier"] ?? null;
$destination_email = $_POST["destination_email"];
//sanitize the destination conditions
if (!empty($destination_conditions)) {
@ -314,6 +315,9 @@
if (!permission_exists('destination_domain')) {
$domain_uuid = $row["domain_uuid"] ?? null;
}
if (!permission_exists('destination_email')) {
$destination_email = $row["destination_email"] ?? null;
}
}
unset($row);
@ -1090,6 +1094,7 @@
$array['destinations'][$x]["destination_distinctive_ring"] = $destination_distinctive_ring;
}
$array['destinations'][$x]["destination_record"] = $destination_record;
$array['destinations'][$x]["destination_email"] = $destination_email;
if (!empty($destination_ringback) && $ringbacks->valid($destination_ringback)) {
$array['destinations'][$x]["destination_ringback"] = $destination_ringback;
}
@ -1270,6 +1275,7 @@
$destination_order = $destination_order ?? '';
$destination_enabled = $destination_enabled ?? '';
$destination_description = $destination_description ?? '';
$destination_email = $destination_email ?? '';
$select_style = $select_style ?? '';
//pre-populate the form
@ -1316,6 +1322,7 @@
$destination_order = $row["destination_order"];
$destination_enabled = $row["destination_enabled"];
$destination_description = $row["destination_description"];
$destination_email = $row["destination_email"];
}
unset($sql, $parameters, $row);
}
@ -1815,6 +1822,34 @@
echo "</tr>\n";
}
//destination email
if (permission_exists('destination_email') && permission_exists('message_view')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_email']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='destination_email'>\n";
echo " <option value=''></option>\n";
if (!empty($destination_email) && $destination_email == "true") {
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
if (!empty($destination_email) && $destination_email == "false") {
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-destination_email']."\n";
echo "</td>\n";
echo "</tr>\n";
}
//users
if (permission_exists('user_edit')) {
echo "<tr id='tr_user'>\n";

1
app/messages Submodule

@ -0,0 +1 @@
Subproject commit 623feb4b1a15e9b29a583a28fafb75e904d1e5c5

1
app/providers Submodule

@ -0,0 +1 @@
Subproject commit a7848165253d0fe3445d961e8f374b5b48dace20