Préparation pour l'envoi des erreurs soap par mail

This commit is contained in:
Michael RICOIS 2011-06-29 06:33:56 +00:00
parent 7b062e2191
commit 70515c43a5

View File

@ -1091,19 +1091,24 @@ class WsScores
/** /**
* soaperror * soaperror
* @param unknown_type $requete * @param string $requete
* @param unknown_type $reponse * @param string $reponse
* @param unknown_type $fault * @param unknown_type $fault
*/ */
protected function soaperror($requete, $reponse, $fault) protected function soaperror($requete, $reponse, $fault)
{ {
$message = ''; $message = '';
// Quel machine .... $message.= 'Erreur SOAP - Code : '.$fault->faultcode.' - Message : '.$fault->faultstring;
$mail = new Zend_Mail(); $message.= "Requete:\n";
$message.= "Reponse:\n";
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'server');
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail->setSubject('Erreur SOAP - '.$config->server->name.' -'.date('Ymd'));
$mail->setBodyText('Ceci est le texte du message.'); $mail->setBodyText('Ceci est le texte du message.');
$mail->setSubject('TestSubject'); $mail->setFrom('supportdev');
$mail->setFrom('supportdev@scores-decisions.com', 'SERVEUR'); $mail->addToKey('supportdev');
$mail->addTo('supportdev@scores-decisions.com', 'Support DEV');
$mail->send(); $mail->send();
} }