I have a very confusing problem I wish to share with you and hope someone has a suggestion/solution!
I once implemented something from a previous forum in order to block and email back unregistered customers using the following code:
/System/PostMaster/NewTicket.pm
Line 40
Code: Select all
##### First part of blocking unregistered customer email addresses
$Self->{EmailObject} = Kernel::System::Email->new(%Param);
##### end of change
Code: Select all
##### if there is no customer user found!
if ( !$GetParam{'X-OTRS-CustomerUser'} ) {
$GetParam{'X-OTRS-CustomerUser'} = $GetParam{SenderEmailAddress};
$Self->{LogObject}->Log( Priority => 'info', Message => "$_ not in database, rejecting and sending email" );
# Send Agent an email to notify of blocked ticket
$Self->{EmailObject}->Send(
To => $GetParam{SenderEmailAddress},
From => 'support@oursite.com',
Subject => "Nachricht wurde von unserem Server abgelehnt worden",
Body => "Dear Sir or Madame,\r\n\r\ndas Ticketsystem hat eine E-mail von Ihrer E-mail-Adresse ($GetParam{SenderEmailAddress}) empfangen. Before you can use our ticket system please register at our website http://support.oursite.com registrieren.\r\n.\r\n\r\nKind Regards\r\nYour Support-Team\r\nOur Company \r\nwww.oursite.com",
Charset => $Self->{ConfigObject}->Get('DefaultCharset'),
MimeType => 'text/plain',
Loop => 1,
Attachment => [
{
Filename => 'customer-email.txt',
Content => "Subject: $Param{GetParam}->{Subject}\r\nBody: $Param{GetParam}->{Body}",
ContentType => 'application/octet-stream',
}
],
);
return;
}
##################### End of changes
If I run this script manually it states:
After the customer has registered it then cleans up ok:Starting OTRS PostMaster... (/opt/otrs//var/spool/problem-email-0675cc1fa6aa757c399f3ac294b191a6) failed.
Can anyone explain why it is behaving in this way and how I can ensure the customer is not repeatedly emailed back??Starting OTRS PostMaster... (/opt/otrs//var/spool/problem-email-0675cc1fa6aa757c399f3ac294b191a6) (remove email) done.
Many thanks in advance.