Unable to send Email
Posted: Fri Sep 25, 2009 2:50 pm
Hi All,
I searched the forums related to this one but could not find a solution to my problem.
I have a parallel job retrieving reject records from a table in sql server to a file. I have an after job routine to email this file as an attachment after the retrieval is successful.
I am getting the following warning message
Test_Connection123..AfterJob (DSSendMail): The following tokens in the 'dssendmail_template.txt' file have not been set in the call to DSSendMail: %server%
The following is the code in my Afterjob Routine
Call DSLogInfo("Getting Reject File Information",DSJ.ME)
strDatapath = DSGetParamInfo(DSJ.ME, "$DATAPATH", DSJ.PARAMVALUE)
strRejectFileLoc = strDatapath:'\GenSys\Rejects'
strRejectFile = DSGetParamInfo(DSJ.ME, "JPM_SEQL_REJECT", DSJ.PARAMVALUE)
Call DSLogInfo("File":strRejectFile:" will be emailed to the client, if reject records exist",DSJ.ME)
*----Sending Mail to Business Users----*
FROM_MAILID = DSGetParamInfo(DSJ.ME, "JPM_FROM_MAILID", DSJ.PARAMVALUE)
TO_MAILID = DSGetParamInfo(DSJ.ME, "JPM_TO_MAILID", DSJ.PARAMVALUE)
Server_Name= DSGetParamInfo(DSJ.ME, "$MailServer", DSJ.PARAMVALUE)
ERROR_DIR = strRejectFileLoc
SUBJECT = "E-Mail Notification For Rejects"
If intNoRecReject >0 Then
Final_Attachment = ERROR_DIR:"\":strRejectFile
Result= DSSendMail("From:":FROM_MAILID:"\nTo:":TO_MAILID:"\nSubject:":SUBJECT:"\nAttach:":Final_Attachment:"\nBody:":"%report%":"\nServer:":Server_Name)
End
Any help is highly appreciated
I searched the forums related to this one but could not find a solution to my problem.
I have a parallel job retrieving reject records from a table in sql server to a file. I have an after job routine to email this file as an attachment after the retrieval is successful.
I am getting the following warning message
Test_Connection123..AfterJob (DSSendMail): The following tokens in the 'dssendmail_template.txt' file have not been set in the call to DSSendMail: %server%
The following is the code in my Afterjob Routine
Call DSLogInfo("Getting Reject File Information",DSJ.ME)
strDatapath = DSGetParamInfo(DSJ.ME, "$DATAPATH", DSJ.PARAMVALUE)
strRejectFileLoc = strDatapath:'\GenSys\Rejects'
strRejectFile = DSGetParamInfo(DSJ.ME, "JPM_SEQL_REJECT", DSJ.PARAMVALUE)
Call DSLogInfo("File":strRejectFile:" will be emailed to the client, if reject records exist",DSJ.ME)
*----Sending Mail to Business Users----*
FROM_MAILID = DSGetParamInfo(DSJ.ME, "JPM_FROM_MAILID", DSJ.PARAMVALUE)
TO_MAILID = DSGetParamInfo(DSJ.ME, "JPM_TO_MAILID", DSJ.PARAMVALUE)
Server_Name= DSGetParamInfo(DSJ.ME, "$MailServer", DSJ.PARAMVALUE)
ERROR_DIR = strRejectFileLoc
SUBJECT = "E-Mail Notification For Rejects"
If intNoRecReject >0 Then
Final_Attachment = ERROR_DIR:"\":strRejectFile
Result= DSSendMail("From:":FROM_MAILID:"\nTo:":TO_MAILID:"\nSubject:":SUBJECT:"\nAttach:":Final_Attachment:"\nBody:":"%report%":"\nServer:":Server_Name)
End
Any help is highly appreciated