clearSubject example



        $return = $this->eventManager->filter('Shopware_Controllers_Backend_OrderState_Filter', $return[
            'subject' => Shopware()->Front(),
            'id' => $orderId,
            '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;
    }

    
if (!empty($body)) {
                $body = $this->trackFilter($body$mailing['id']);
                $mail->setBodyHtml($body);
            }
            if (!empty($bodyText)) {
                $bodyText = $this->altFilter($bodyText);
                $mail->setBodyText($bodyText);
            }

            $subject = $template->fetch('string:' . $mailing['subject']$template);

            $mail->clearSubject();
            $mail->setSubject($subject);
            $mail->clearRecipients();
            $mail->addTo($user['email']);
            $mail->setAssociation(NewsletterMailFilter::NEWSLETTER_MAIL, true);
            $validator = $this->container->get(EmailValidator::class);
            if (!$validator->isValid($user['email'])) {
                echo "Skipped invalid email\n";
                // SW-4526                 // Don't `continue` with next iteration without setting user's lastmailing                 // else the mailing.status will never be set to 2                 // and sending the mail will block
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;
            case 'Body':
                if ($this->_isHtml) {
                    $this->setBodyHtml($value);
                } else {
                    $this->setBodyText($value);
                }
                break;
            case 'AltBody':
                if ($this->_isHtml) {
                    
$mail = $this->container->get('modules')->Order()->createStatusMail($orderId, 0, $mailTemplateName);
        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', ''),
            
Home | Imprint | This part of the site doesn't use cookies.