Files
Facilitor/CUST/PCHE/export/sendmailFactuur.vbs
Arthur Egberink a8451506cd PCHE#36417 -- Exact bestanden automatisch mailen.
svn path=/Website/branches/v2016.1/; revision=29336
2016-05-10 08:00:29 +00:00

20 lines
758 B
Plaintext

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