Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function build() |
||
28 | { |
||
29 | $subject = sprintf('[%s] @ %s: %s', $this->data['class'], $this->data['host'], $this->data['exception']); |
||
30 | |||
31 | // to protect from gmail's anchors automatic generating |
||
32 | $this->withSwiftMessage(function ($message) { |
||
33 | $message->setBody( |
||
34 | preg_replace( |
||
35 | ['~\.~', '~http~'], |
||
36 | ['<span>.</span>', '<span>http</span>'], |
||
37 | $message->getBody() |
||
38 | ) |
||
39 | ); |
||
40 | }); |
||
41 | |||
42 | return $this->view('log-envelope::main') |
||
43 | ->with($this->data) |
||
44 | ->to($this->config['to']) |
||
45 | ->from($this->config['from_email'], $this->config['from_name']) |
||
46 | ->subject($subject); |
||
47 | } |
||
48 | } |
||
49 |