feat: TO-kenttä näkyviin vastauslomakkeessa

- Vastaanottaja (TO) näkyy nyt Lähettäjä- ja CC-kenttien välissä
- Esitäytetään tiketin alkuperäisen lähettäjän osoitteella
- Muokattavissa ennen lähetystä
- Backend käyttää frontendistä tullutta TO:ta tai fallbackina from_email

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 22:12:12 +02:00
parent 83509fffc5
commit 5d6aa981b2
3 changed files with 13 additions and 1 deletions

View File

@@ -2075,6 +2075,7 @@ switch ($action) {
$id = $input['id'] ?? '';
$body = trim($input['body'] ?? '');
$replyMailboxId = $input['mailbox_id'] ?? '';
$replyTo = trim($input['to'] ?? '');
$replyCc = trim($input['cc'] ?? '');
if (empty($body)) {
http_response_code(400);
@@ -2124,7 +2125,8 @@ switch ($action) {
$ccToSend = $replyCc !== '' ? $replyCc : ($t['cc'] ?? '');
$subject = 'Re: ' . $t['subject'];
$sent = sendTicketMail($t['from_email'], $subject, $emailBody, $lastMsgId, trim($allRefs), $replyMailbox, $ccToSend);
$toAddress = $replyTo !== '' ? $replyTo : $t['from_email'];
$sent = sendTicketMail($toAddress, $subject, $emailBody, $lastMsgId, trim($allRefs), $replyMailbox, $ccToSend);
if (!$sent) {
http_response_code(500);