|
|
@@ -16,7 +16,8 @@ class ContactRequestProcessor implements ProcessorInterface
|
|
|
{
|
|
|
public function __construct(
|
|
|
private readonly MailerInterface $symfonyMailer,
|
|
|
- private readonly string $contactEmail
|
|
|
+ private readonly string $fromEmail,
|
|
|
+ private readonly string $contactEmail,
|
|
|
)
|
|
|
{}
|
|
|
|
|
|
@@ -34,9 +35,13 @@ class ContactRequestProcessor implements ProcessorInterface
|
|
|
|
|
|
$symfonyMail = (new Email())
|
|
|
->to($this->contactEmail)
|
|
|
- ->from($contactRequest->getEmail())
|
|
|
+ ->from($this->fromEmail)
|
|
|
->subject('Contact from cv.ogene.fr')
|
|
|
- ->text('Name: ' . $contactRequest->getName() ?? '-' . "\n\n" . $contactRequest->getMessage());
|
|
|
+ ->text(
|
|
|
+ 'From : ' . $contactRequest->getEmail() . "\n" .
|
|
|
+ 'Name: ' . $contactRequest->getName() ?? '-' . "\n\n" .
|
|
|
+ $contactRequest->getMessage()
|
|
|
+ );
|
|
|
|
|
|
$this->symfonyMailer->send($symfonyMail);
|
|
|
|