aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2017-12-01 14:28:09 +0100
committermarcinzelent <zelent.marcin@gmail.com>2017-12-01 14:28:09 +0100
commitccf443791736af36391e9274a5633ef2269ecfc0 (patch)
tree0965ea4395c6ac9a2b00deae03e996417fb7c4f9 /src/AppBundle/Controller/EmailController.php
parent316d811f8d2624317083052513b1fdfa10c1e490 (diff)
Removed sending e-mails.
Diffstat (limited to 'src/AppBundle/Controller/EmailController.php')
-rw-r--r--src/AppBundle/Controller/EmailController.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/AppBundle/Controller/EmailController.php b/src/AppBundle/Controller/EmailController.php
deleted file mode 100644
index 982234e..0000000
--- a/src/AppBundle/Controller/EmailController.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: marcin
- * Date: 11/23/17
- * Time: 10:21 AM
- */
-
-namespace AppBundle\Controller;
-
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Swift_SmtpTransport;
-use Swift_Mailer;
-use Swift_Message;
-
-class EmailController extends Controller
-{
- /**
- * @Route("/email")
- */
- public function sendEmail()
- {
-// Create the Transport
- $transport = (new Swift_SmtpTransport('mail.cock.li', 465, 'ssl'))
- ->setUsername('***REMOVED***')
- ->setPassword('***REMOVED***')
- ;
-
-// Create the Mailer using your created Transport
- $mailer = new Swift_Mailer($transport);
-
-// Create a message
- $message = (new Swift_Message('Pollutometer warning ' . date('d/m/Y h:i:s')))
- ->setFrom(['***REMOVED***' => 'Pollutometer'])
- ->setTo(['***REMOVED***@edu.easj.dk' => 'A name'])
- ->setBody($this->renderView(
- // templates/emails/warning.html.twig
- 'warning.html.twig',
- array('name' => 'Test')
- ),
- 'text/html')
- ;
-
-// Send the message
- $result = $mailer->send($message);
-
- return $this->render('warning.html.twig', array('name' => 'Test'));
- }
-
-}