32 lines
734 B
PHP
32 lines
734 B
PHP
<?php
|
|
|
|
$contacts = $order->owner->getChildrenByType("techcontact");
|
|
if(!is_array($contacts) || !count($contacts)) {
|
|
$contacts = [$order->owner];
|
|
}
|
|
|
|
$tos = [];
|
|
foreach($contacts as $contact) {
|
|
if($contact->email) {
|
|
$tos[] = $contact->email;
|
|
}
|
|
}
|
|
|
|
$customer_string = str_replace(["\r","\n"], " ", $order->owner->getCompanyOrName());
|
|
|
|
$subject = "Ihr Übergabeprotokoll / Technikerstammblatt";
|
|
|
|
$this->setReturnValue([
|
|
'subject' => $subject,
|
|
'to' => $tos,
|
|
'from_email' => "support@xinon.at",
|
|
'from_email_name' => "XINON Kundenservice"
|
|
]);
|
|
|
|
?>
|
|
Sehr geehrte Damen und Herren,
|
|
|
|
im Anhang erhalten Sie das technische Übergabeprotokoll zum Anschluss des Kunden <?=$customer_string?> zur weiteren Verwendung.
|
|
|
|
Ihr XINON Team
|