how can I get subject from the $results variable?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
johnmcd
Posts: 2
Joined: Wed Mar 20, 2019 8:00 pm

how can I get subject from the $results variable?

Post 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
johnmcd
Posts: 2
Joined: Wed Mar 20, 2019 8:00 pm

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

Post 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'];
Post Reply