Mail sur suivi

This commit is contained in:
Michael RICOIS 2013-08-28 19:58:09 +00:00
parent 78b20d7b86
commit 202e840745
2 changed files with 19 additions and 2 deletions

View File

@ -90,9 +90,26 @@ if ( $result->count() > 0 ) {
}
if ( copy($source, $dest) ) {
$fluxM->update(array(
'depotDate' => date('YmdHis'),
), 'id='.$item->id);
$subject = "[Flux] - Envoi d'un fichier " . $item->client;
$txt = "Envoi d'un fichier après traitement\n";
$txt.= "Client : ".$item->client."\n";
$txt.= "Mode de transmission : ".$item->typeDepot."\n";
$txt.= "Fichier : ".$item->fileOut."\n";
$mail = new Zend_Mail();
$tr = new Zend_Mail_Transport_Sendmail();
$mail->setDefaultTransport($tr);
$mail->setBodyText($txt);
$mail->setFrom('supportdev@scores-decisions.com', 'Machine');
$mail->addTo('suivi@scores-decisions.com', 'Suivi');
$mail->setSubject($subject);
$mail->send();
}
}

View File

@ -112,8 +112,8 @@ if ( isset($opts->file) )
$tr = new Zend_Mail_Transport_Sendmail();
$mail->setDefaultTransport($tr);
$mail->setBodyText($txt);
$mail->setFrom('production@scores-decisions.com', 'Production');
$mail->addTo('support@scores-decisions.com', 'Support');
$mail->setFrom('supportdev@scores-decisions.com', 'Machine');
$mail->addTo('suivi@scores-decisions.com', 'Suivi');
$mail->setSubject($subject);
$mail->send();