This example sends an e-mail back to the originator with a PDF copy of a fax sent from the CopiaFacts client software (FFCLIENT). It shows the minimun steps needed to generate a simple e-mail after sending a fax.
![]() | CopiaFacts now includes a comprehensive set of scripts to handle post-receive and post-transmit notifications. For most applications you should use the standard scripts in preference to this example. |
It is implemented in a post-process infobox, REPORTSEND.IIF, which will be found in the SCRIPTS folder under the FAXFACTS folder.
Configuration Steps
Your administrator needs to perform three initial steps to implement this feature.
| Keep Fax | The users who require this feature must have the Private Archive checkbox checked on their Send Fax/E-Mail page in FFCLIENT. This can be set by individual client users, or by the administrator checking the 'notify' checkboxes on the Update Users page in the Client Administrator program. |
| Post-Process | The users who require this feature must have a post-process specified. Individual client users can use Fax Transmission Constants on the Setup page to add a command $fax_post-process ReportSend infoboxall, or the command can be added to a template by the administrator and updated for multiple users. |
| Image Location | The USR file for the users who require this feature must have an $script_locn command directed to the DEMOIMG folder. |
Infobox Content
The contents of the postprocess infobox are as follows:
;REPORTSEND.IIF
;Infobox to report sent and/or failed faxes by sending and e-mail copy
$type FSFILE @CR_QUEUE ; will generate a second FS file
$next_box s:IIF_PROC_COMPLETE
$var_def_copy ; copy variables to the generated FS file
; make PDF file with description
$if OC_CLASS = S
$set_var txt "Your fax was sent on @DATEL at @TIME2<BR>"
$set_var txt | "The destination was @RCVRFAX, @ROUTETO<BR>"
$set_var txt | "The remote fax answerback was @OC_CSID"
$set_var etxt1 "Your fax was sent on @DATEL at @TIME2"
$set_var etxt2 "The destination was @RCVRFAX, @ROUTETO"
$set_var etxt3 "The remote fax answerback was @OC_CSID"
$else
$set_var txt "Your fax could not be sent after @OC_ACOUNT attempt(s)<BR>"
$set_var txt | "The destination was @RCVRFAX, @ROUTETO<BR>"
$set_var txt | "Failure reason: @OC_DESC"
$set_var etxt1 "Your fax could not be sent after @OC_ACOUNT attempt(s)"
$set_var etxt2 "The destination was @RCVRFAX, @ROUTETO"
$set_var etxt3 "Failure reason: @OC_DESC"
$endif
$set_var pdffile @KEPT_FAX
$set_var pdffile $ext .PDF
$set_var done "$fn:CreatePDFThumbNails(@KEPT_FILE, @PDFFILE, cols=1, LETTER, @txt)"
; create EMAIL FS file
$email_subject "Report on fax to `RCVRFAX"
$email_text "`ETXT1"
$email_text "`ETXT2"
$email_text "`ETXT3"
$email_to `USERINFO_EMAIL
$email_attach "`PDFFILE" application/pdf
; optional signed PDF file
;$pdf_sign_keyfile "@FFBASE\keyfile.pfx;@secret1" "SigField" "Security" "Illinois" "tim@@copia.com"