Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | public function sendMail($mailTo) |
||
26 | { |
||
27 | $hash = md5(uniqid()); |
||
28 | $message = \Swift_Message::newInstance() |
||
29 | ->setSubject('Registration') |
||
30 | ->setFrom('[email protected]') |
||
31 | ->setTo($mailTo) |
||
32 | ->setBody( |
||
33 | $this->templating->render( |
||
34 | '@App/Emails/registration.html.twig', |
||
35 | array('hash' => $hash, 'email' => $mailTo) |
||
36 | ), |
||
37 | 'text/html' |
||
38 | ); |
||
39 | |||
40 | $this->mailer->send($message); |
||
41 | |||
42 | return $hash; |
||
43 | } |
||
44 | } |