| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function sendHTML($to, $from, $subject, $htmlContent, $attachedFiles = false, $customheaders = false, $plainContent = false) |
||
| 8 | { |
||
| 9 | $cssFileLocation = Director::baseFolder() . Config::inst()->get("EmogrifierMailer", "css_file"); |
||
| 10 | $cssFileHandler = fopen($cssFileLocation, 'r'); |
||
| 11 | $css = fread($cssFileHandler, filesize($cssFileLocation)); |
||
| 12 | fclose($cssFileHandler); |
||
| 13 | $emog = new \Pelago\Emogrifier($htmlContent, $css); |
||
| 14 | $htmlContent = $emog->emogrify(); |
||
| 15 | return parent::sendHTML($to, $from, $subject, $htmlContent, $attachedFiles, $customheaders, $plainContent); |
||
| 16 | } |
||
| 17 | } |
||
| 18 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.