@atayarani_impri This problem typically occurs when the name of the custom command does not match the name defined in the sendemail.py file. I encountered this when I made a copy of the default sendemail.py file to make our own custom sendemail command. I named the new command newsendemail (with the file newsendemail.py). In the file newsendemail.py, there is a piece of code: sendemailRegex = r'\|\s*sendemail'
if (re.findall(sendemailRegex, searchToRun)):
parameters['input-search'] = re.split(sendemailRegex, searchToRun)[0]
parameters['et'] = jsonJob.get('earliestTime')
parameters['lt'] = jsonJob.get('latestTime')
else:
raise PDFException("Can't attach PDF - ssName and pdfViewID unavailable") This is where that error is generated. For us, I had to change the r'\|\s*sendemail' part to r'\|\s*newsendemail' The regex is searching for 'sendemail' in the search query, but the name of the custom command has been changed to 'newsendemail', so the regex needs to be updated. The error occurs if the regex does not find anything in the search query.
... View more