diff --git a/js/saimod_mail.js b/js/saimod_mail.js
index 00b1662..8d35725 100644
--- a/js/saimod_mail.js
+++ b/js/saimod_mail.js
@@ -20,7 +20,7 @@ function init_saimod_mail_contacts() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -59,7 +59,7 @@ function init_saimod_mail_contact() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -103,7 +103,7 @@ function init_saimod_mail_contact_new() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -144,7 +144,7 @@ function init_saimod_mail_lists() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -177,7 +177,7 @@ function init_saimod_mail_list() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -211,7 +211,7 @@ function init_saimod_mail_list_new() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -248,7 +248,7 @@ function init_saimod_mail_emails() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -277,26 +277,72 @@ function init_saimod_mail_email() {
$('#btn-email-update').click(function(){
var id = $('#input-email-id').val();
+ var account = $('#select-email-account').val();
var sender = $('#input-email-sender').val();
var name = $('#input-email-name').val();
var subject = $('#input-email-subject').val();
var text_template = $('#select-email-text-template').val();
var html_template = $('#select-email-html-template').val();
+ var placeholders = [];
+ $('.email-placeholder').not('.email-placeholder-new').each(function() {
+ var id = $(this).attr('placeholder');
+ var name = $(this).find('.email-placeholder-name').val();
+ var type = $(this).find('.email-placeholder-type').val();
+ var deleted = $(this).hasClass('placeholder_deleted') ? 1 : 0
+ var data = {};
+ switch(type){
+ case "2":
+ data.table = $(this).find('.email-placeholder-data-switch-table').val();
+ data.field = $(this).find('.email-placeholder-data-switch-field').val();
+ data.default = $(this).find('.email-placeholder-data-switch-default').val();
+ var switch_values = {};
+ $(this).find('.email-placeholder-switch-value').not('.email-placeholder-switch-value-new').each(function(){
+ switch_values[$(this).find('.email-placeholder-data-switch-value-key').val()] = $(this).find('.email-placeholder-data-switch-value-value').val();
+ })
+ data.values = switch_values;
+ break;
+ case "3":
+ data.default = $(this).find('.email-placeholder-data-name-value').val();
+ break;
+ default:
+ data.value = $(this).find('.email-placeholder-data-text-value').val();
+ }
+ placeholders.push({
+ id: id,
+ name: name,
+ type: type,
+ data: data,
+ deleted: deleted
+ });
+ });
+ var images = [];
+ $('.email-image').not('.email-image-new').each(function() {
+ images.push({
+ id: $(this).attr('image'),
+ name: $(this).find('.email-image-name').val(),
+ file: $(this).find('.email-image-file').val(),
+ mime: $(this).find('.email-image-mime').val(),
+ deleted: $(this).hasClass('image_deleted') ? 1 : 0
+ });
+ });
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
action: 'update_email',
data: {
id: id,
+ account: account,
sender: sender,
name: name,
subject: subject,
text_template: text_template ? text_template : null,
- html_template: html_template ? html_template : null
+ html_template: html_template ? html_template : null,
+ placeholders: placeholders,
+ images: images
}
},
success: function(data){
@@ -318,7 +364,7 @@ function init_saimod_mail_email() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -340,6 +386,61 @@ function init_saimod_mail_email() {
}
});
});
+
+ $('#btn-email-template-text').click(function(){
+ var template = $('#select-email-text-template').val();
+ if(template === ""){
+ system.load('mail(template_new)');
+ } else {
+ system.load('mail(template);id.'+template);
+ }
+ });
+
+ $('#btn-email-template-html').click(function(){
+ var template = $('#select-email-html-template').val();
+ if(template === ""){
+ system.load('mail(template_new)');
+ } else {
+ system.load('mail(template);id.'+template);
+ }
+ });
+
+ $('#btn-email-image-new').click(function(){
+ var $new = $('.email-image-new').clone().removeClass('email-image-new');
+ $('#tbody_mail_email_images').append($new);
+ });
+
+ $('#btn-email-placeholder-new').click(function(){
+ var $new = $('.email-placeholder-new').clone().removeClass('email-placeholder-new');
+ $('#tbody_mail_email_placeholders').append($new);
+ });
+
+ $('.btn-email-placeholder-switch-value-new').click(function(){
+ var $new = $(this).parent().parent().parent().find('.email-placeholder-switch-value-new').clone().removeClass('email-placeholder-switch-value-new');
+ $(this).parent().parent().parent().append($new);
+ });
+
+ $('.email-placeholder-type').trigger('change');
+}
+
+function placeholder_type(e){
+ switch(e.val()){
+ case '2':
+ $(e).parent().parent().find('.email-placeholder-data-text').hide();
+ $(e).parent().parent().find('.email-placeholder-data-switch').show();
+ $(e).parent().parent().find('.email-placeholder-data-name').hide();
+ break;
+ case '3':
+ $(e).parent().parent().find('.email-placeholder-data-text').hide();
+ $(e).parent().parent().find('.email-placeholder-data-switch').hide();
+ $(e).parent().parent().find('.email-placeholder-data-name').show();
+ break;
+ default:
+ $(e).parent().parent().find('.email-placeholder-data-text').show();
+ $(e).parent().parent().find('.email-placeholder-data-switch').hide();
+ $(e).parent().parent().find('.email-placeholder-data-name').hide();
+ }
+
}
function init_saimod_mail_email_new() {
@@ -349,6 +450,7 @@ function init_saimod_mail_email_new() {
$('#btn-email-new-insert').click(function(){
var name = $('#input-email-new-name').val();
+ var account = $('#select-email-new-account').val();
var sender = $('#input-email-new-sender').val();
var subject = $('#input-email-new-subject').val();
var text_template = $('#select-email-new-text-template').val();
@@ -356,13 +458,14 @@ function init_saimod_mail_email_new() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
action: 'insert_email',
data: {
name: name,
+ account: account,
sender: sender,
subject: subject,
text_template: text_template,
@@ -397,7 +500,7 @@ function init_saimod_mail_templates() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -432,7 +535,7 @@ function init_saimod_mail_template() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
@@ -470,7 +573,7 @@ function init_saimod_mail_template_new() {
$.ajax({
async: true,
url: this.endpoint,
- type: 'GET',
+ type: 'POST',
dataType: 'JSON',
data: {
sai_mod: '.SAI.saimod_mail',
diff --git a/saimod_mail.php b/saimod_mail.php
index faecada..1a2f464 100644
--- a/saimod_mail.php
+++ b/saimod_mail.php
@@ -15,6 +15,14 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
const EMAIL_PROTOTYPE_ACCESS_ANDROID= 31;
const EMAIL_PROTOTYPE_ACCESS_IOS = 32;
+ const EMAIL_PLACEHOLDER_TYPE_TEXT = 1;
+ const EMAIL_PLACEHOLDER_TYPE_SWITCH = 2;
+ const EMAIL_PLACEHOLDER_TYPE_NAME = 3;
+
+ const EMAIL_ACCOUNT_CONTACT = 1;
+ const EMAIL_ACCOUNT_PROTOTYPING = 2;
+ const EMAIL_ACCOUNT_CROWDFUNDING = 3;
+
public static function subscribe($email,$list){
return \SQL\SUBSCRIBE::QI(array($email,$list));
}
@@ -41,15 +49,57 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
$email_data = \SQL\EMAIL_SELECT::Q1(array($email_id));
$template_text = \SQL\EMAIL_TEMPLATE_SELECT::Q1(array($email_data['template_text']));
$template_html = \SQL\EMAIL_TEMPLATE_SELECT::Q1(array($email_data['template_html']));
- //TODO
- //$smtp = \SYSTEM\CONFIG\config::get(\config_ids::DEMOCRACY_EMAIL_PROTOTYPING);
- $smtp = \SYSTEM\CONFIG\config::get(\config_ids::DEMOCRACY_EMAIL_CONTACT);
- $to = $email;
- //TODO
+ $placeholders_qq= \SQL\EMAIL_PLACEHOLDER_SELECT_EMAIL::QQ(array($email_id));
+ $images_qq = \SQL\EMAIL_IMAGE_SELECT_EMAIL::QQ(array($email_id));
+
+ $smtp = null;
+ switch($email_data['account']){
+ case self::EMAIL_ACCOUNT_PROTOTYPING:
+ $smtp = \SYSTEM\CONFIG\config::get(\config_ids::DEMOCRACY_EMAIL_PROTOTYPING);
+ break;
+ case self::EMAIL_ACCOUNT_CROWDFUNDING:
+ $smtp = \SYSTEM\CONFIG\config::get(\config_ids::DEMOCRACY_EMAIL_CROWDFUNDING);
+ break;
+ // contact
+ default:
+ $smtp = \SYSTEM\CONFIG\config::get(\config_ids::DEMOCRACY_EMAIL_CONTACT);
+ }
+
$replacements = [];
$replacements['emoji_mobile'] = '📱';
foreach($data as $k => $v){
$replacements['data_'.$k] = $v;}
+ while($placeholder = $placeholders_qq->next()){
+ switch($placeholder['type']){
+ case self::EMAIL_PLACEHOLDER_TYPE_TEXT:
+ $value = json_decode($placeholder['data'],true)['value'];
+ $value = str_replace('\\n', "\n", $value);
+ $replacements[$placeholder['name']] = $value;
+ break;
+ case self::EMAIL_PLACEHOLDER_TYPE_SWITCH:
+ $data = json_decode($placeholder['data'],true);
+ $d = null;
+ switch($data['table']){
+ case 'contact':
+ $d = $contact_data[$data['field']];
+ break;
+ }
+ $value = $data['default'];
+ foreach($data['values'] as $k => $v){
+ if($d == $k){
+ $value = $v;}
+ }
+ $replacements[$placeholder['name']] = $value;
+ break;
+ case self::EMAIL_PLACEHOLDER_TYPE_NAME:
+ $value = json_decode($placeholder['data'],true)['default'];
+ if($contact_data['name_first'] || $contact_data['name_last']){
+ $value = trim($contact_data['name_first'].' '.$contact_data['name_last']);
+ }
+ $replacements[$placeholder['name']] = $value;
+ break;
+ }
+ }
if($list){
$replacements['unsubscribe_link'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).
'#!unsubscribe;token.'.
@@ -57,12 +107,17 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
array( 'email' => $email,'list' => $list),
true);
}
+ $to = $email;
$from = \SYSTEM\PAGE\replace::replace($email_data['sender'],$replacements);
$subject = \SYSTEM\PAGE\replace::replace($email_data['subject'],$replacements);
$text = \SYSTEM\PAGE\replace::replace($template_text['value'], $replacements);
$html = \SYSTEM\PAGE\replace::replace($template_html['value'], $replacements);
- //TODO
- $images = ["democracy_logo" => (new \PAPI('img/logo.png'))->SERVERPATH()];
+
+ $images = [];
+ while($image = $images_qq->next()){
+ $images[$image['name']] = [ 'file' => (new \PFILES('email/'.$image['file']))->SERVERPATH(),
+ 'mime' => $image['mime']];
+ }
//TODO
$attachments = [];
@@ -239,6 +294,8 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
public static function sai_mod__SAI_saimod_mail_action_email($id){
$vars = \SQL\EMAIL_SELECT::Q1(array($id));
$vars['template_lock'] = $vars['system_lock'] ? 'disabled' : '';
+ $vars['selected_account_1'] = $vars['selected_account_2'] = $vars['selected_account_3'] = '';
+ $vars['selected_account_'.$vars['account']] = 'selected';
//text template
$vars['text_options'] = '';
$res = \SQL\EMAIL_TEMPLATES_SELECT::QQ(array(0));
@@ -253,6 +310,65 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
$row['selected'] = $row['id'] == $vars['template_html'] ? 'selected' : '';
$vars['html_options'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_template_option.tpl'))->SERVERPATH(),$row);
}
+ //placeholders
+ $vars['placeholders'] = '';
+ $res = \SQL\EMAIL_PLACEHOLDER_SELECT_EMAIL::QQ(array($id));
+ while($row = $res->next()){
+ $data = json_decode($row['data'],true);
+ $row['selected_1'] = $row['selected_2'] = $row['selected_3'] = '';
+ $row['selected_'.$row['type']] = 'selected';
+ $row['new_placeholder'] = '';
+ $row['text_value'] = $row['type'] == self::EMAIL_PLACEHOLDER_TYPE_TEXT ? $data['value'] : '';
+ $row['name_default'] = $row['type'] == self::EMAIL_PLACEHOLDER_TYPE_NAME ? $data['default'] : '';
+ $row['switch_table'] = $row['type'] == self::EMAIL_PLACEHOLDER_TYPE_SWITCH ? $data['table'] : '';
+ $row['switch_field'] = $row['type'] == self::EMAIL_PLACEHOLDER_TYPE_SWITCH ? $data['field'] : '';
+ $row['switch_default'] = $row['type'] == self::EMAIL_PLACEHOLDER_TYPE_SWITCH ? $data['default'] : '';
+ $row['switch_values'] = '';
+ if($row['type'] == self::EMAIL_PLACEHOLDER_TYPE_SWITCH){
+ if(!array_key_exists('values', $data)){
+ $data['values'] = [];
+ }
+ foreach($data['values'] as $k=>$v){
+ $d = ['k' => $k, 'v' => $v, 'new_switch_value' => ''];
+ $row['switch_values'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_placeholder_switch_value.tpl'))->SERVERPATH(),$d);
+ }
+ $d = ['k' => '', 'v' => '', 'new_switch_value' => 'email-placeholder-switch-value-new'];
+ $row['switch_values'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_placeholder_switch_value.tpl'))->SERVERPATH(),$d);
+ }
+ //new value
+ $vars['placeholders'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_placeholder.tpl'))->SERVERPATH(),$row);
+ }
+ //placeholder new
+ $new_placeholder = ['selected_1' => 'selected', 'selected_2' => '', 'selected_3' => '',
+ 'name' => '',
+ 'text_value' => '', 'name_default' => '',
+ 'switch_table' => '', 'switch_field' => '', 'switch_default' => '',
+ 'new_placeholder' => 'email-placeholder-new'];
+ $d = ['k' => '', 'v' => '', 'new_switch_value' => 'email-placeholder-switch-value-new'];
+ $new_placeholder['switch_values'] = \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_placeholder_switch_value.tpl'))->SERVERPATH(),$d);
+ $vars['placeholders'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_placeholder.tpl'))->SERVERPATH(),$new_placeholder);
+
+ //files
+ $files = \SYSTEM\FILES\files::get('email');
+ //images
+ $vars['images'] = '';
+ $res = \SQL\EMAIL_IMAGE_SELECT_EMAIL::QQ(array($id));
+ while($row = $res->next()){
+ $row['files'] = '';
+ $row['new_image'] = '';
+ foreach($files as $file){
+ $f = ['name' => $file, 'selected' => $row['file'] == $file ? 'selected' : ''];
+ $row['files'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_image_file.tpl'))->SERVERPATH(),$f);
+ }
+ $vars['images'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_image.tpl'))->SERVERPATH(),$row);
+ }
+ //image new
+ $new_image = ['name' => '', 'id' => '', 'mime' => 'image/png', 'files' => '', 'new_image' => 'email-image-new'];
+ foreach($files as $file){
+ $f = ['name' => $file, 'selected' => ''];
+ $new_image['files'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_image_file.tpl'))->SERVERPATH(),$f);
+ }
+ $vars['images'] .= \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_mail/tpl/saimod_mail_email_image.tpl'))->SERVERPATH(),$new_image);
//send
$vars['send'] = '';
$res = \SQL\EMAIL_LISTS_SELECT::QQ();
@@ -289,12 +405,30 @@ class saimod_mail extends \SYSTEM\SAI\sai_module{
}
public static function sai_mod__SAI_saimod_mail_action_update_email($data){
- \SQL\EMAIL_UPDATE::QI(array($data['name'],$data['sender'],$data['subject'],$data['text_template'],$data['html_template'],$data['id']));
+ \SQL\EMAIL_UPDATE::QI(array($data['name'],$data['account'],$data['sender'],$data['subject'],$data['text_template'],$data['html_template'],$data['id']));
+ foreach($data['images'] as $image){
+ if($image['deleted'] && $image['id']){
+ \SQL\EMAIL_IMAGE_DELETE::QI(array($data['id'],$image['id']));
+ } else if($image['id']){
+ \SQL\EMAIL_IMAGE_UPDATE::QI(array($image['name'],$image['file'],$image['mime'],$data['id'],$image['id']));
+ } else if(!$image['deleted']){
+ \SQL\EMAIL_IMAGE_INSERT::QI(array($image['id'],$data['id'],$image['name'],$image['file'],$image['mime']));
+ }
+ }
+ foreach($data['placeholders'] as $placeholder){
+ if($placeholder['deleted'] && $placeholder['id']){
+ \SQL\EMAIL_PLACEHOLDER_DELETE::QI(array($data['id'],$placeholder['id']));
+ } else if($placeholder['id']){
+ \SQL\EMAIL_PLACEHOLDER_UPDATE::QI(array($placeholder['name'],$placeholder['type'],json_encode($placeholder['data']),$data['id'],$placeholder['id']));
+ } else if(!$placeholder['deleted']){
+ \SQL\EMAIL_PLACEHOLDER_INSERT::QI(array($placeholder['id'],$data['id'],$placeholder['name'],$placeholder['type'],json_encode($placeholder['data'])));
+ }
+ }
return \JsonResult::ok();
}
public static function sai_mod__SAI_saimod_mail_action_insert_email($data){
- \SQL\EMAIL_INSERT::QI(array($data['name'],$data['sender'],$data['subject'],$data['text_template'],$data['html_template']));
+ \SQL\EMAIL_INSERT::QI(array($data['name'],$data['account'],$data['sender'],$data['subject'],$data['text_template'],$data['html_template']));
return \JsonResult::ok();
}
diff --git a/sql/EMAIL_IMAGE_DELETE.php b/sql/EMAIL_IMAGE_DELETE.php
new file mode 100644
index 0000000..09186cd
--- /dev/null
+++ b/sql/EMAIL_IMAGE_DELETE.php
@@ -0,0 +1,9 @@
+','${emoji_mobile} DEMOCRACY Mail Test',1,2,0);
+INSERT IGNORE INTO email_template (`id`,`type`,`name`,`value`,`system_lock`) VALUES (1,0,'Mail Test Text','Use this Mail for testing',0);
+INSERT IGNORE INTO email_template (`id`,`type`,`name`,`value`,`system_lock`) VALUES (2,1,'Mail Test HTML','Use this Mail for testing',0);
+
INSERT IGNORE INTO email (`id`,`name`,`sender`,`subject`,`template_text`,`template_html`,`system_lock`) VALUES (10,'Website Contact','${data_vorname} ${data_nachname} <${data_email}>','${emoji_mobile} DEMOCRACY Website: ${data_type} from ${data_email}',10,11,1);
INSERT IGNORE INTO email_template (`id`,`type`,`name`,`value`,`system_lock`) VALUES (10,0,'Website Contact Text','Eine Nachricht ist über die Website eingegangen:\n\n${data_json}\n\nAchtung: Diese EMail ist die einzige Kopie dieser Daten',1);
INSERT IGNORE INTO email_template (`id`,`type`,`name`,`value`,`system_lock`) VALUES (11,1,'Website Contact HTML','\nEine Nachricht ist über die Website eingegangen: \n \n
Type: ${data_type} \n\n \n EMail \n ${data_email} \n \n \n Name \n ${data_vorname} ${data_nachname} \n \n \n Type \n ${data_type} \n \n \n Text \n ${data_text} \n \n
\nRaw Data: \n${data_json} \n \n\n',1);
diff --git a/tpl/saimod_mail_email.tpl b/tpl/saimod_mail_email.tpl
index ba49f2c..d82f305 100644
--- a/tpl/saimod_mail_email.tpl
+++ b/tpl/saimod_mail_email.tpl
@@ -9,6 +9,16 @@
Name
+
+ Account
+
+
+ contact@democracy-deutschland.de
+ prototyping@democracy-deutschland.de
+ crowdfunding@democracy-deutschland.de
+
+
+
From
@@ -32,6 +42,7 @@
No Template
${text_options}
+
@@ -41,11 +52,84 @@
No Template
${html_options}
+
+
+ Placeholders
+
+
+
+
+
+
+
+ Name
+ Type
+ Data
+
+
+
+
+
+
+
+ emoji_mobile
+ STATIC
+ 📱
+
+
+
+ data_*
+ STATIC
+ Mixed
+
+
+
+ unsubscribe_link
+ STATIC
+ Link
+
+
+ ${placeholders}
+
+
+
+
+
+ Images
+
+
+
+
+
+
+
+ Name
+ File
+ Mime
+
+
+
+
+
+
+ ${images}
+
+
+
+
Preview
diff --git a/tpl/saimod_mail_email_image.tpl b/tpl/saimod_mail_email_image.tpl
new file mode 100644
index 0000000..7b184ea
--- /dev/null
+++ b/tpl/saimod_mail_email_image.tpl
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ ${files}
+
+
+
+
+ ${mime}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tpl/saimod_mail_email_image_file.tpl b/tpl/saimod_mail_email_image_file.tpl
new file mode 100644
index 0000000..63340a7
--- /dev/null
+++ b/tpl/saimod_mail_email_image_file.tpl
@@ -0,0 +1 @@
+${name}
\ No newline at end of file
diff --git a/tpl/saimod_mail_email_new.tpl b/tpl/saimod_mail_email_new.tpl
index 855cddc..422d1e7 100644
--- a/tpl/saimod_mail_email_new.tpl
+++ b/tpl/saimod_mail_email_new.tpl
@@ -5,6 +5,16 @@
Name
+
+ Account
+
+
+ contact@democracy-deutschland.de
+ prototyping@democracy-deutschland.de
+ crowdfunding@democracy-deutschland.de
+
+
+
From
diff --git a/tpl/saimod_mail_email_placeholder.tpl b/tpl/saimod_mail_email_placeholder.tpl
new file mode 100644
index 0000000..a9445e7
--- /dev/null
+++ b/tpl/saimod_mail_email_placeholder.tpl
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ Text
+ Switch
+ Name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tpl/saimod_mail_email_placeholder_switch_value.tpl b/tpl/saimod_mail_email_placeholder_switch_value.tpl
new file mode 100644
index 0000000..6c3a4a4
--- /dev/null
+++ b/tpl/saimod_mail_email_placeholder_switch_value.tpl
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file