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
* @param unknown_type $requete
* @param unknown_type $reponse
* @param string $requete
* @param string $reponse
* @param unknown_type $fault
*/
protected function soaperror($requete, $reponse, $fault)
{
$message = '';
// Quel machine ....
$mail = new Zend_Mail();
$message.= 'Erreur SOAP - Code : '.$fault->faultcode.' - Message : '.$fault->faultstring;
$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->setSubject('TestSubject');
$mail->setFrom('supportdev@scores-decisions.com', 'SERVEUR');
$mail->addTo('supportdev@scores-decisions.com', 'Support DEV');
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$mail->send();
}