Merge branch 'master' into feat/rss-feed

This commit is contained in:
Maël Gangloff 2025-04-28 17:51:08 +02:00
commit e9dd9ae1fd
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
7 changed files with 41 additions and 11 deletions

View File

@ -46,7 +46,7 @@ class DomainDeletedNotification extends DomainWatchdogNotification
{ {
$ldhName = $this->domain->getLdhName(); $ldhName = $this->domain->getLdhName();
return new EmailMessage((new TemplatedEmail()) $email = (new TemplatedEmail())
->from($this->sender) ->from($this->sender)
->to($recipient->getEmail()) ->to($recipient->getEmail())
->priority(Email::PRIORITY_HIGHEST) ->priority(Email::PRIORITY_HIGHEST)
@ -55,6 +55,12 @@ class DomainDeletedNotification extends DomainWatchdogNotification
->locale('en') ->locale('en')
->context([ ->context([
'domain' => $this->domain, 'domain' => $this->domain,
])); ]);
$email->getHeaders()
->addHeader('In-Reply-To', "<$ldhName+updated@domain-watchdog>")
->addHeader('References', "<$ldhName+updated@domain-watchdog>");
return new EmailMessage($email);
} }
} }

View File

@ -46,7 +46,7 @@ class DomainOrderErrorNotification extends DomainWatchdogNotification
{ {
$ldhName = $this->domain->getLdhName(); $ldhName = $this->domain->getLdhName();
return new EmailMessage((new TemplatedEmail()) $email = (new TemplatedEmail())
->from($this->sender) ->from($this->sender)
->to($recipient->getEmail()) ->to($recipient->getEmail())
->priority(Email::PRIORITY_HIGH) ->priority(Email::PRIORITY_HIGH)
@ -55,6 +55,12 @@ class DomainOrderErrorNotification extends DomainWatchdogNotification
->locale('en') ->locale('en')
->context([ ->context([
'domain' => $this->domain, 'domain' => $this->domain,
])); ]);
$email->getHeaders()
->addTextHeader('In-Reply-To', "<$ldhName+order-error@domain-watchdog>")
->addTextHeader('References', "<$ldhName+order-error@domain-watchdog>");
return new EmailMessage($email);
} }
} }

View File

@ -50,7 +50,7 @@ class DomainOrderNotification extends DomainWatchdogNotification
{ {
$ldhName = $this->domain->getLdhName(); $ldhName = $this->domain->getLdhName();
return new EmailMessage((new TemplatedEmail()) $email = (new TemplatedEmail())
->from($this->sender) ->from($this->sender)
->to($recipient->getEmail()) ->to($recipient->getEmail())
->priority(Email::PRIORITY_HIGHEST) ->priority(Email::PRIORITY_HIGHEST)
@ -60,6 +60,12 @@ class DomainOrderNotification extends DomainWatchdogNotification
->context([ ->context([
'domain' => $this->domain, 'domain' => $this->domain,
'provider' => $this->connector->getProvider()->value, 'provider' => $this->connector->getProvider()->value,
])); ]);
$email->getHeaders()
->addTextHeader('In-Reply-To', "<$ldhName+ordered@domain-watchdog>")
->addTextHeader('References', "<$ldhName+ordered@domain-watchdog>");
return new EmailMessage($email);
} }
} }

View File

@ -46,7 +46,7 @@ class DomainUpdateErrorNotification extends DomainWatchdogNotification
{ {
$ldhName = $this->domain->getLdhName(); $ldhName = $this->domain->getLdhName();
return new EmailMessage((new TemplatedEmail()) $email = (new TemplatedEmail())
->from($this->sender) ->from($this->sender)
->to($recipient->getEmail()) ->to($recipient->getEmail())
->priority(Email::PRIORITY_NORMAL) ->priority(Email::PRIORITY_NORMAL)
@ -55,6 +55,12 @@ class DomainUpdateErrorNotification extends DomainWatchdogNotification
->locale('en') ->locale('en')
->context([ ->context([
'domain' => $this->domain, 'domain' => $this->domain,
])); ]);
$email->getHeaders()
->addTextHeader('In-Reply-To', "<$ldhName+update-error@domain-watchdog>")
->addTextHeader('References', "<$ldhName+update-error@domain-watchdog>");
return new EmailMessage($email);
} }
} }

View File

@ -48,7 +48,7 @@ class DomainUpdateNotification extends DomainWatchdogNotification
{ {
$ldhName = $this->domainEvent->getDomain()->getLdhName(); $ldhName = $this->domainEvent->getDomain()->getLdhName();
return new EmailMessage((new TemplatedEmail()) $email = (new TemplatedEmail())
->from($this->sender) ->from($this->sender)
->to($recipient->getEmail()) ->to($recipient->getEmail())
->priority(Email::PRIORITY_HIGH) ->priority(Email::PRIORITY_HIGH)
@ -57,6 +57,12 @@ class DomainUpdateNotification extends DomainWatchdogNotification
->locale('en') ->locale('en')
->context([ ->context([
'event' => $this->domainEvent, 'event' => $this->domainEvent,
])); ]);
$email->getHeaders()
->addTextHeader('In-Reply-To', "<$ldhName+updated@domain-watchdog>")
->addTextHeader('References', "<$ldhName+updated@domain-watchdog>");
return new EmailMessage($email);
} }
} }

View File

@ -1,4 +1,4 @@
{% extends "emails/base.html.twig" %} {% extends "../base.html.twig" %}
{% set email_color = '#0056b3' %} {% set email_color = '#0056b3' %}
{% set title = 'Domain Watchdog Alert' %} {% set title = 'Domain Watchdog Alert' %}