Get the value of a specified E-Mail header command


Inputs:  Parm1 = UJP pathname
         Parm2 = Name of header (with or without trailing ':')

Outputs: Parm2 = Value of requested header

Returns:  0 = success
         -2 = cannot open UJP
         -3 = cannot read UJP
         -6 = header name contains embedded white space

The header name passed in Parm2 should not contain embedded blanks and may optionally include the trailing colon.  The header is retrieved from the $fs_template $email_header commands in the specified UJP file.

The value returned in Parm2 is the literal value of the header string, from the last definition of the header in the file. Absence of a definition for the header is not an error and will result in an empty string in Parm2. Double quotes in the value are not stripped and variables are not expanded.

The result placed in Parm2 will be truncated if necessary to a length of 255 (or MaxBuf - 1) bytes plus a terminating null byte.

Do not pass a literal string as parm2 because the parameter is also used to return the result.

Examples:

Get the effective Reply-To header:

strcopy(parm1, "@FFJOBS\\00001234\\NO_JTYPE\\JOB12345678.UJP");

strcopy(parm2, "Reply-To:");

res = JobDllEntry("GetEmailHeaderValue", parm1, parm2, 0);