Parameter

Top  Previous  Next

Parsing texts > Parameter

 

The IMP filter passes two parameters to the loaded TextTransformer project.

 

1.the log file can be accessed in the project with the function ConfigParam.
2.a name for the current mail can be read in the project with the function ExtraParam. The name is formed from the word "Message" on which the start date of the Spamihilator and a number are for the mail are appended. E.g.: Message_09-01-15-14-51-05_6

 

Warning: The parameter might become more complex in future updates of the IMP filter. This can mean that you then have to change your project, if it uses them.

 

By means of these parameters, e.g. it is possible to write additional information into the logging file:

 

{{

if(!ConfigParam().empty())

{

  RedirectOutput(ConfigParam(), true);  // append to log file 

  m_bLog = true;

  out << ExtraParam() << endl;  // Mail name   

}

else

  m_bLog = false;  

}}   

  

... // Text parsen

 

{{

if(m_bLog)

{

  if(m_iResult == 0)

     out << indent << " indifferent" << endl;

  ResetOutput();

}  

}}  

 

A further example of the use of ExtraParam is the storage of the mail texts.