Code: Select all
# if there is no customer user found!
if ( !$GetParam{'X-OTRS-CustomerUser'} ) {
$GetParam{'X-OTRS-CustomerUser'} = $GetParam{SenderEmailAddress};
}
Sample code to change:
Code: Select all
# if there is no customer user found!
if ( !$GetParam{'X-OTRS-CustomerUser'} ) {
$Self->{LogObject}->Log( Priority => 'info', Message => "$_ not in database" );
return;
}
- Back up the file before editing
- This change can not be bypassed (you can never create a new ticket via email without being in the customer database) -- I think(?)
- If you want, you can change "info" to "notice" or "error" depending on how you want to log this message
- This change WILL get overwritten by updates.
Note: if you've seen this elsewhere, I removed the "no CustomerID" entry. This sub of NewTicket.pm is the check for all ways to get a CustomerUser. The last thing it tries is to see if there is an X-OTRS-CustomerUser entry. If that entry does NOT exist, the default code attempts to make a new CustomerUser from the SenderEmailAddress. The above change simply rejects the ticket and adds a log entry.