PCHE#36417 -- Exact bestanden automatisch mailen.

svn path=/Website/branches/v2016.1/; revision=29336
This commit is contained in:
Arthur Egberink
2016-05-10 08:00:29 +00:00
parent 4dc9453e5a
commit a8451506cd
2 changed files with 27 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
REM GEN_EXPORT_FACTUUR.BAT REM GEN_EXPORT_FACTUUR.BAT
REM REM
REM Exporteert informatie naar een export-bestand en genereert de factuut REM Exporteert informatie naar een export-bestand en genereert de factuur
REM REM
REM Context : roep deze file aan indien nodig, of schedule deze REM Context : roep deze file aan indien nodig, of schedule deze
REM Verseist: de randvoorwaarde voor het gebruik van gen_export REM Verseist: de randvoorwaarde voor het gebruik van gen_export
@@ -19,3 +19,10 @@ CALL ..\..\..\utils\gen_export\gen_export.bat EXACT_KWARTAAL
CALL ..\..\..\utils\gen_export\gen_export.bat EXACT_JAAR CALL ..\..\..\utils\gen_export\gen_export.bat EXACT_JAAR
copy .\EXACT\exact_20*.xml .\EXACT\backup
del .\EXACT\exact_20*.xml
CALL ..\..\..\utils\gen_export\gen_export.bat EXACT_OUTPUT
if not exist ".\EXACT\exact_20*.xml" goto einde
cscript sendmailFactuur.vbs
:einde

View File

@@ -0,0 +1,19 @@
Dim fso, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder("d:\Apps\Facilitor\Fplace5i\CUST\PCHE\export\EXACT")
Set files = folder.Files
For each folderIdx In files
If InStrRev(folderIdx.Name, "exact_20") > 0 Then
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "no_reply@pche.facilitor.nl"
objEmail.To = "fa@pch-dienstengroep.nl;a.egberink@sgfacilitor.nl"
objEmail.Subject = "Facilitor: Bestand met factuur gegevens Strijp-S"
objEmail.Textbody = "Automatisch verzonden bestand van factuur gegevens."
objEmail.AddAttachment "d:\Apps\Facilitor\Fplace5i\CUST\PCHE\export\EXACT\" + folderIdx.Name
objEmail.Send
End If
Next