SHARE
TWEET

CrystalReports CMD eMail

a guest May 2nd, 2014 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. REM run vbscript to export report
  3.  
  4. "C:\Customer Folders\VBScript Location\crystal_export_excel.vbs"
  5.  
  6. REM need to put delay before next command possibly
  7.  
  8. ping www.google.com
  9.  
  10. REM now rename email and archive the file
  11.  
  12. ren "C:\Customer Folders\Output Location\*.xls" %date:~10%-%date:~4,2%-%date:~7,2%_ReportName.xls
  13.  
  14. "C:\Program Files\Febooti Command line email\febootimail" -SMTP smtp.youremailserver.com -USER you@youremailserver.com -PASS your-password -FROM noreply@youremailserver.com -TO customer1@recipient.com;customer2@recipient.com -SUBJECT "eMail Subject" -BODY "Attached File - Automated Crystal Export" -FILE "C:\Customer Folders\ExportedFile Location\*.xls"
  15.  
  16. move "C:\Customer Folders\ExportedFile Location\*.xls" "C:\Customer Folders\Archive Folder Location\archive"
RAW Paste Data
Top