i have a question regarding sending Emails from a perl module in OTRS. I am trying to send a mail with 2 attachements, one being a png-image and a pdf-document. I did a bit of research and also found one code-example in the OTRS-API. I got so far, that sending the email works just fine and also there looks to be an attachement (i started with the png image), but the problem is, this attachement is only 1kb of size and empty image file. Heres the code i am using:
Code: Select all
my $mailobject = $SendObject->Send(
From => '....',
To => '...',
Subject => '',
Charset => 'utf-8',
MimeType => 'text/plain',
Body => 'my text',
Attachment => [
{
Filename => "testfile.png",
Content => "empty",
ContentType => "image/png",
}
],
...
);
And one further question what would be the Content and the ContentType for a pdf-attachment? Is the content-type "application/pdf"??