Conditions | 2 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | public function sendMail($data) |
||
28 | { |
||
29 | try { |
||
30 | $data["key"] = config()->get('mailer.mandrill.api_key'); |
||
31 | |||
32 | $httpClient = new HttpClient(); |
||
33 | $httpClient->createMultiRequest() |
||
34 | ->createRequest("https://mandrillapp.com/api/1.0/messages/send.json") |
||
35 | ->setMethod("POST") |
||
36 | ->setData($data) |
||
37 | ->start(); |
||
38 | |||
39 | return true; |
||
40 | } catch (\Exception $e) { |
||
41 | return false; |
||
42 | } |
||
45 |