I want to make it possible that I can forward emails from my private email-address to the ticket@ address, that the message will be added to the existing ticket through the subject.so I added after line 137 in pipe_function.php this :
Code: Select all
if ( strpos( strtolower($ticket['email']), strtolower($tmpvar['email']) ) === false )
{
if(strtolower($tmpvar['email']) != 'myprivate1@example.com' && strtolower($tmpvar['email']) != 'myprivate2@example.com')
{
$tmpvar['trackid'] = '';
}
}
In my test-file it works fine:
Code: Select all
$ticketEmail = 'frank';
$tmpvar = 'myprivate1';
$trackid = 'xxx';
if ( strpos( strtolower($ticketEmail), strtolower($tmpvar) ) === false )
{
if(strtolower($tmpvar) != 'myprivate1' && strtolower($tmpvar) != 'myprivate2')
{
$trackid = '';
}
}
if ( empty($trackid) )
{
// new
echo 1;
}
else
{
// answer
echo 2;
}