I have the form and everything but can't figure out how to send an email, I'm using this code to test:
Code: Select all
if ( $Self->{Subaction} eq 'NotifyAgent' ) {
my $EmailObject = Kernel::System::Email->new( %{$Self} );
my $Body = "Test";
my $Subject = "Test";
my $Sent = $EmailObject->Send(
To => "test\@test.com",
Subject => $Subject,
Charset => $Self->{LayoutObject}->{UserCharset},
MimeType => 'text/plain',
Body => $Body
);
if ( !$Sent ) {
$Self->{LayoutObject}->FatalError(
Comment => 'Please contact your administrator'
);
return;
}
return 1;
}
It's not working and I get this in the apache's log :
malformed header from script. Bad header=1("message5", function(data) {: customer.pl, referer: https://mydomain.com/otrs/customer.pl?A ... ateBooking
/otrs/customer.pl did not send an HTTP header
Maybe some of you know what I'm doing wrong or maybe I'f there is something that can be done via Agent Interface.... any help would be appreciated.
Thanks