| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function send(Email $email) |
||
| 22 | { |
||
| 23 | $headers = $email->getHeaders( |
||
| 24 | [ |
||
| 25 | 'from', |
||
| 26 | 'sender', |
||
| 27 | 'replyTo', |
||
| 28 | 'readReceipt', |
||
| 29 | 'returnPath', |
||
| 30 | 'to', |
||
| 31 | 'cc', |
||
| 32 | 'subject', |
||
| 33 | ] |
||
| 34 | ); |
||
| 35 | |||
| 36 | trim($this->_headersToString($headers)); |
||
| 37 | $message = trim(implode("\r\n", (array) $email->message())); |
||
| 38 | $result = [ |
||
| 39 | 'headers' => $headers, |
||
| 40 | 'message' => $message, |
||
| 41 | ]; |
||
| 42 | |||
| 43 | Configure::write('test_transport_email', $result); |
||
| 44 | |||
| 45 | return $result; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |