updateEnMail example

return 1672164687;
    }

    public function update(Connection $connection): void
    {
        $update = new MailUpdate(
            MailTemplateTypes::MAILTYPE_USER_RECOVERY_REQUEST,
            $this->getContentPlainEn(),
            $this->getContentHtmlEn()
        );

        $this->updateEnMail($connection$update);
    }

    public function updateDestructive(Connection $connection): void
    {
        // implement update destructive     }

    private function getContentHtmlEn(): string
    {
        return <<<MAIL <div style="font-family:arial; font-size:12px;"> <p> Dear {{ userRecovery.user.firstName }} {{ userRecovery.user.lastName }},<br/> <br/> there has been a request to reset your password. Please confirm the link below to specify a new password.<br/> <br/> <a href="{{ resetUrl }}">Reset password</a><br/> <br/> This link is valid for the next 2 hours. After that you have to request a new confirmation link.<br/> If you do not want to reset your password, please ignore this email. No changes will be made. </p> </div>
'Your sign-up with {{ salesChannel.translated.name }}'
        );

        $this->updateEnMailSubject($connection$mailSubjectUpdate);

        // update customer register double opt in         $mailUpdate = new MailUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER_DOUBLE_OPT_IN,
            $this->getSignupConfirmationPlainTemplateEn(),
            $this->getSignupConfirmationHtmlTemplateEn()
        );
        $this->updateEnMail($connection$mailUpdate);

        $mailSubjectUpdate = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER_DOUBLE_OPT_IN,
            'Please confirm your sign-up with {{ salesChannel.translated.name }}'
        );

        $this->updateEnMailSubject($connection$mailSubjectUpdate);
    }

    public function updateDestructive(Connection $connection): void
    {
        
use Shopware\Core\Defaults;
use Shopware\Core\Framework\Log\Package;
use Shopware\Core\Framework\Uuid\Uuid;

#[Package('core')] trait UpdateMailTrait
{
    use ImportTranslationsTrait;

    final protected function updateMail(MailUpdate $update, Connection $connection): void
    {
        $this->updateEnMail($connection$update);

        $this->updateDeMail($connection$update);
    }

    final protected function updateMailSubject(MailSubjectUpdate $update, Connection $connection): void
    {
        $this->updateEnMailSubject($connection$update);

        $this->updateDeMailSubject($connection$update);
    }

    
Home | Imprint | This part of the site doesn't use cookies.