From 202e840745802997ddb94bd9e69c7938e3a19fd4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 28 Aug 2013 19:58:09 +0000 Subject: [PATCH] Mail sur suivi --- fileRecv.php | 17 +++++++++++++++++ fileSend.php | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/fileRecv.php b/fileRecv.php index 793564e..71d3d12 100644 --- a/fileRecv.php +++ b/fileRecv.php @@ -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(); + } } diff --git a/fileSend.php b/fileSend.php index 75c46ed..051645e 100644 --- a/fileSend.php +++ b/fileSend.php @@ -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();