Forum Discussion

Brian_Beard's avatar
18 years ago

Job Report Email in message body instead of attachment

Is there any way to have BackupExec insert a job report summary in the message body of an email instead of attaching it?

Right now I get an email when the job completes with this in the body:
(Server: "BKEXECSrv") (Job: "Differential Backup") The job completed successfully. However, the following conditions were encountered:

5 files were skipped.


And the report with the information I really need is attached. I'd prefer that the report just showed up in the body. Is this possible?

I tried creating a job summary report and it does the same thing.

6 Replies

  • I'm guessing no, because the report itself is HTML-based. They attach it to make sure you view it in something that will display it properly; if you're trying to view it in text-only mode it will be all mangled and ugly...

    It would be cool if there were a per-recipient option to send it as formatted .txt instead, and to choose whether it is attached or inline.
  • For the simple job summary reports though, Outlook can correctly display the HTML.

    I think what I'm going to do is setup a scheduled task and batch script to email the report that is generated using blat.

    My job summary report is saved here C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML so I can just email that report manually.

    Would be nice if BE made this an option though.
  • Hello Brian,
    Thank you for the suggestion.
    As Ken has mentioned please put an enhancement Request on the Site mentioned.

    Thanks
    Regards
  • Here is a basic command file which I've been working on today which uses the command line mail program BLAT to send an HTML email.

    Once I've worked out how to determine the job number of the backup, I'll add it as a post-backup script.

    @echo off

    set JOB_NUM=00052

    set EMAIL_RECIPIENTS=ITAdmin@yourdomain.com

    set BACKUPEXEC_DATA_DIR=C:\Program Files\Symantec\Backup Exec\Data
    set HTML_FILE_NAME=BEX_%COMPUTERNAME%_%JOB_NUM%.htm

    set HTML_FILE_PATH="%BACKUPEXEC_DATA_DIR%\%HTML_FILE_NAME%"
    if NOT EXIST %HTML_FILE_PATH% (
    echo\
    echo error: no such file '%HTML_FILE_NAME%' found in %BACKUPEXEC_DATA_DIR%!!!
    goto END
    )

    set SUBJECT="%COMPUTERNAME% - BackupExec job #%JOB_NUM%"

    echo\
    echo Emailing job report '%HTML_FILE_NAME%' to %EMAIL_RECIPIENTS%...
    echo\
    echo ================================================================================
    type %HTML_FILE_PATH% | c:\utils\blat\blat - -html -to %EMAIL_RECIPIENTS% -s %SUBJECT%
    echo ================================================================================

    :END
  • I ended up doing something similar. Not as elegant as your method though.

    I got around needing to know the report # by copying the report file to a new file (of which i knew the name).

    I have a summary report scheduled to run each morning. I set the summary job to send an email to a null recipient. This creates the HTML report and saves it to the directory I mentioned above. Then I use a scheduled task with Blat to email it and remove the old reports.

    copy "C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML\*.htm" "C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML\report.htm"
    blat -install SMTPSERVER backupExec@domain.com
    blat "C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML\report.htm" -to report@domain.com -subject "BackupExec Report for %date%" -html
    del "C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML\*.htm"
    del "C:\Program Files\Common Files\Symantec Shared\SaveReports\HTML\*.gif"Message was edited by:
    Brian Beard