Page 1 of 1

how can I get subject from the $results variable?

Posted: Wed Mar 20, 2019 8:42 pm
by johnmcd
Script URL:
Version of script: 2.8.2
Hosting company: hostmonster
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: email_parser.php hesk_pipe.php parse

Write your message below:
is it possible to access the subject of the incoming email message in the pipe?

there is the line // Parse the incoming email
$results = parser();

how can I get subject from the $results variable in hesk_pipe.php?

I want to parse the subject line of the incoming message for a category, and then modify hesk_pipe.php to set the right category before creating the ticket from the incoming email.

Thanks!
John

Re: how can I get subject from the $results variable?

Posted: Thu Mar 21, 2019 1:26 pm
by johnmcd
I figured it out.
There's an example in pipe_functions.php
The value is in $tmpvar['subject']

// Process email subject, convert to UTF-8, set to "[Piped email]" if none set
$tmpvar['subject'] = isset($results['subject']) ? $results['subject'] : $hesklang['pem'];