<?php

namespace YSquare\Shipcloud\Core;

class Email extends Email_parent
{
    public function sendSendedShipcloudMail($order, $shipcloud, $subject = null): array
    {
        $this->setViewData("shipcloud", $shipcloud);
        $result = parent::sendSendedNowMail($order, $subject);
        $fullName = $order->oxorder__oxbillfname->getRawValue() . " " . $order->oxorder__oxbilllname->getRawValue();
        return ["send" => $result, "recipient" => [$order->oxorder__oxbillemail->value, $fullName]];
    }
}
