Ben bir günlük dosyası bir e-posta göndermek için Zend_Mail kullanıyorum, ama bu posta istemcileri sevmiyorum tehlikeli karakterler gönderiyor.
Benim kod:
<?php
$sBody = "errors.log (>= WARN):\n\n";
$rFile = fopen($sErrorsLog, "r");
while (!feof($rFile))
{
$sLine = fgets($rFile);
$sBody.= $sLine;
}
$oMail = new Zend_Mail();
$oMail->addTo($sTo)
->setFrom($sFrom)
->setSubject($sSubject)
->setBodyText($sMessage);
E-posta body alırsınız:
errors.log (> = UYARI):
damgası | 2010-07-05T09: 48:03 +10:00 mesajı | O: 11: "DiziNesnesi": 3: {s: 9: "istisna"; O: 32: "Zend_Controller_Action_Exception": 7: {s: 25 : "
Hata günlüğü (bu üst bir özüdür) içerir
damgası | 2010-07-05T09: 48:03 +10:00 mesajı | O: 11: "DiziNesnesi": 3: {s: 9: "istisna"; O: 32: "Zend_Controller_Action_Exception": 7: {s: 25 : "Zend_Exception_previous";N;s:10:"*message";s:64:"Action "crgdtgdf" does not exist and was not trapped in __call()";s:17:"Exceptionstring";s:0:"";s:7:"*code";i:404;s:7:"*file";s:73:"/var/www/development/workspaces/s.rees/library/Zend/Controller/Action.php";s:7:"*line";i:485;s:16:"Exceptiontrace";a:4:{i:0;a:6:{s:4:"file";s:73:"/var/www/development/workspaces/s.rees/library/Zend/Controller/Action.php";s:4:"line";i:515;s:8:"function";s:6:"__call";s:5:"class";s:22:"Zend_Controller_Action";s:4:"type";s:2:"->";s:4:"args";a:2:{i:0;s:14:"crgdtgdfAction";i:1;a:0:{}}}i:1;a:6:
Any ideas how I can filter/encode the email so all of the log output is shown? I really need it emailed out with all the details.