clearFrom example

/** * Magic setter method * * @param string $name */
    public function __set($name$value)
    {
        switch ($name) {
            case 'From':
                $fromName = $this->getFromName();
                $this->clearFrom();
                $this->setFrom($value$fromName);
                break;
            case 'FromName':
                $from = $this->getFrom();
                $this->clearFrom();
                $this->setFrom($from$value);
                break;
            case 'Subject':
                $this->clearSubject();
                $this->setSubject($value);
                break;
            
'status' => $statusId,
            'mailname' => $templateName,
            'mail' => $mail,
            'engine' => Shopware()->Template(),
        ]);

        $mail->clearSubject();
        $mail->setSubject($return['subject']);

        $mail->setBodyText($return[CartKey::POSITIONS]);

        $mail->clearFrom();
        $mail->setFrom($return['frommail']$return['fromname']);

        $mail->addTo($return['email']);

        return $mail;
    }

    /** * Set payment status by order id * * @param int $orderId * @param int $paymentStatusId * @param bool $sendStatusMail * @param string|null $comment */
if (!$mail instanceof Enlight_Components_Mail) {
            $this->View()->assign([
                'success' => false,
                'message' => 'Could not create mail object.',
            ]);

            return;
        }

        $mail->clearRecipients();
        $mail->clearSubject();
        $mail->clearFrom();
        $mail->clearBody();

        $mailData = [
            'attachments' => $attachments,
            'subject' => $this->Request()->getParam('subject', ''),
            'fromMail' => $this->Request()->getParam('fromMail'),
            'fromName' => $this->Request()->getParam('fromName'),
            'to' => [$this->Request()->getParam('to')],
            'isHtml' => $this->Request()->getParam('isHtml'),
            'bodyHtml' => $this->Request()->getParam('contentHtml', ''),
            'bodyText' => $this->Request()->getParam('content', ''),
        ];
Home | Imprint | This part of the site doesn't use cookies.