I want to allow one email address to be able to reply to all tickets if the correct ticket number is in the subject line, basically when our remote support session ends it sends an email with the ticket number in the subject and then body how long host was connected for etc this is then used to work out billing times. I know it involves editing code but cant quiet work out how todo it.
Thanks

John

This isn't something that you can achieve without altering the code.
Although I'm curious why you would want to do this.
Agents can already do this by replying,

I tried setting the email address as one of the agents emails but this just created a new ticket, the email is formulated with a ticket number but email itself isn’t generated from osticket. I have edited the code to allow no check on users email if email has ticket number in subject then it adds the email to the correct ticket but not as a internal comment any help with what code to edit to make it a internal comment would be much appreciated.

6 days later

` So I can update any ticket from my companies domain with the below code but all replies are as messages, can someone tell me how I can pass the correct code like "type" N and "flag" at the same time so it adds the reply as a internal note.
Thanks
John

// custom mod to allow own emails to update tickets
    if ($subject
            // Required `#` followed by one or more of
            //      punctuation (-) then letters, numbers, and symbols
            // (Try not to match closing punctuation (`]`) in [#12345])
            && preg_match("/#((\p{P}*[^\p{C}\p{Z}\p{P}]+)+)/u", $subject, $match)
            //Lookup by ticket number
            && ($ticket = Ticket::lookupByNumber($match[1]))
            // Is it a company email address
            && (strpos($mailinfo["email"], "@domain.com") !== false ))
        {   
            $staffId = Staff::getIdByEmail($mailinfo['email']);
                if ($staffId && $mailinfo['staffId'] != $staffId)
                    {
                  $mailinfo['staffId'] = $staffId;
                return $ticket->getLastMessage();}
                
        }
    
    return null;
}`
Write a Reply...