Skip to content

Commit aff687c

Browse files
Multiple mail adresses
1 parent 83a6c5d commit aff687c

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

blueprints/snippets/form_confirm.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ enable_confirm:
44

55
confirm_email:
66
label: form.block.options.confirm_email
7-
type: email
7+
type: text
8+
pattern: ^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$
9+
help: form.block.options.email.help
810
width: 1/2
911
when:
1012
enable_confirm: true

blueprints/snippets/form_notify.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ enable_notify:
44

55
notify_email:
66
label: form.block.options.notify_email
7-
type: email
7+
type: text
8+
pattern: ^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$
9+
help: form.block.options.email.help
810
width: 1/2
911
when:
1012
enable_notify: true

classes/Form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ public function sendNotification($body = NULL, $recipient = NULL)
480480

481481
$emailData = [
482482
'from' => option('microman.formblock.from_email'),
483-
'to' => $recipient,
483+
'to' => explode(';', $recipient),
484484
'subject' => $this->message('notify_subject'),
485485
'body' => [
486486
'text' => Str::unhtml($body),
@@ -528,7 +528,7 @@ public function sendConfirmation($body = NULL, $reply =NULL)
528528
$emailData = [
529529
'from' => option('microman.formblock.from_email'),
530530
'to' => $this->field('email', 'value'),
531-
'replyTo' => $reply,
531+
'replyTo' => explode(';', $reply),
532532
'subject' => $this->message('confirm_subject'),
533533
'attachments' => $this->fields()->files('tmp_name'),
534534
'body' => [

lib/languages/de.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999

100100

101101
'form.block.options' => 'Sendeoptionen',
102+
'form.block.options.email.help' => 'Mehrere Empfänger möglich. Getrennt mit `;`',
102103
'form.block.options.info' => "**Mit *\{\{ \}\}* können Sie eingehende Werte mittels Bezeichner einfügen.**\n",
103104
'form.block.options.enable_notify' => "Benachrichtigung senden",
104105
'form.block.options.notify_email' => "Empfängeradresse",

lib/languages/en.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
'form.block.fromfields.file.warning.text' => 'Be careful with executable file types (e.g. application/zip, application/msword). These may contain malware.',
9999

100100
'form.block.options' => 'Options',
101+
'form.block.options.email.help' => 'Multiple recipients possible. Separated with `;`',
101102
'form.block.options.enable_notify' => "Send notification",
102103
'form.block.options.notify_email' => "Recipient address",
103104
'form.block.options.notify_subject' => "Subject",

0 commit comments

Comments
 (0)