Mailer From
This commit is contained in:
2
.env
2
.env
@@ -53,7 +53,7 @@ MAILER_DSN=smtp://mailer:1025
|
||||
# Alternatively, via SMTP (no extra package needed):
|
||||
# MAILER_DSN="smtp://apikey:%env(SENDGRID_API_KEY)%@smtp.sendgrid.net:587?encryption=tls"
|
||||
# Optional default sender (used by test command if --from not passed):
|
||||
# MAILER_FROM=no-reply@your-domain.tld
|
||||
MAILER_FROM=noreply@escapepage.dev
|
||||
SENDGRID_API_KEY=your_real_key_goes_here
|
||||
###< symfony/mailer ###
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ APP_SECRET=a8f89e179e8c338423697669d6728c2c
|
||||
### Prefer storing SENDGRID_API_KEY using Symfony Secrets or real env vars.
|
||||
###> symfony/mailer ###
|
||||
MAILER_DSN=sendgrid://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@default
|
||||
MAILER_FROM=mailer@escapepage.nl
|
||||
###< symfony/mailer ###
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||
parameters:
|
||||
mailer_from: '%env(MAILER_FROM)%'
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
|
||||
@@ -9,6 +9,6 @@ opcache.validate_timestamps=1
|
||||
opcache.revalidate_freq=0
|
||||
|
||||
log_errors=On
|
||||
error_log=/var/www/html/var/log/errorlog_php.txt
|
||||
error_log=/var/www/html/var/log/errorlog_php.log
|
||||
session.gc_maxlifetime=1440
|
||||
session.cookie_lifetime=0
|
||||
|
||||
@@ -39,7 +39,7 @@ class RegistrationController extends AbstractController
|
||||
// generate a signed url and email it to the user
|
||||
$emailVerifier->sendEmailConfirmation('app_verify_email', $user,
|
||||
(new TemplatedEmail())
|
||||
->from('noreply@escapepage.dev')
|
||||
->from($this->getParameter('mailer_from'))
|
||||
->to($user->getEmail())
|
||||
->subject('Please Confirm your Email')
|
||||
->htmlTemplate('tech/registration/confirmation_email.html.twig')
|
||||
|
||||
Reference in New Issue
Block a user