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 |
||
29 | public function sendMail($mailTo) |
||
30 | { |
||
31 | $hash = md5(uniqid()); |
||
32 | $message = \Swift_Message::newInstance() |
||
33 | ->setSubject('Registration') |
||
34 | ->setFrom($this->mailerFrom) |
||
35 | ->setTo($mailTo) |
||
36 | ->setBody( |
||
37 | $this->templating->render( |
||
38 | '@App/Emails/registration.html.twig', |
||
39 | array('hash' => $hash, 'email' => $mailTo) |
||
40 | ), |
||
41 | 'text/html' |
||
42 | ); |
||
43 | |||
44 | $this->mailer->send($message); |
||
45 | |||
46 | return $hash; |
||
47 | } |
||
48 | |||
68 | } |