Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
46c7b24e
Commit
46c7b24e
authored
Mar 04, 2022
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete MailController for testing email
parent
bfb41bd6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
MailerController.php
src/Controller/MailerController.php
+0
-43
No files found.
src/Controller/MailerController.php
deleted
100644 → 0
View file @
bfb41bd6
<?php
namespace
App\Controller
;
use
App\Entity\Adherent
;
use
App\Entity\GlobalParameter
;
use
App\Entity\Payment
;
use
App\Form\Type\AdhererFormType
;
use
App\Utils\CustomEntityManager
;
use
Symfony\Bundle\FrameworkBundle\Controller\AbstractController
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\Routing\Annotation\Route
;
use
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
;
class
MailerController
extends
AbstractController
{
private
$em
;
private
$mailer
;
public
function
__construct
(
CustomEntityManager
$em
,
\Swift_Mailer
$mailer
)
{
$this
->
em
=
$em
;
$this
->
mailer
=
$mailer
;
}
/**
* @Route("/testmail",name="testmail")
*/
public
function
sendEmail
()
{
$email
=
(
new
\Swift_Message
(
'Message de test Kohinos'
))
->
setFrom
(
$this
->
em
->
getRepository
(
GlobalParameter
::
class
)
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setTo
(
'julien.jorry@gmail.com'
)
->
setCharset
(
'utf-8'
)
->
setBody
(
'Hello from symfony!'
);
$sentEmail
=
$this
->
mailer
->
send
(
$email
);
dump
(
$sentEmail
);
return
$this
->
redirectToRoute
(
'index'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment