Page 1 of 1

addAttachment to Payment E-Mail

Posted: 28 Aug 2018, 12:07
by stiller
hi there.

I've tried to attach a PDF to the payment mail following your configuration:
https://aimeos.org/docs/Configuration/C ... ttachments

here my typoscript translate in the scheduler section

Code: Select all

client.html.email {
payment.attachments {
0 = fileadmin/agb.pdf
   }   
   email-logo = fileadmin/logo.png
}
I've tried relative and absolute path entries with/without domain. No mail at all is beeing sent as soon as I'm using this configuration. also no logo is beeing displayed at the top of the mail body.

by the way. I'm receiving customer account mails in arabic whereas payment mails are in the default language. how can this happen?

typo3 8.7.18
aimeos 18.7.0

any hints?
Volker

Re: addAttachment to Payment E-Mail

Posted: 03 Sep 2018, 09:39
by aimeos
Guess, the data is still in the e-mail but the e-mail structure isn't recognized by the e-mail client. Can you check that?

Re: addAttachment to Payment E-Mail

Posted: 09 Sep 2018, 22:16
by stiller
how can I check that?
as stated before.
no mail is beeing sent at all as soon as I implement the attachment typoscript.
do you get a mail out on your typo3 reference system?

Re: addAttachment to Payment E-Mail

Posted: 10 Sep 2018, 21:28
by aimeos
The configuration is used here:
https://github.com/aimeos/ai-client-htm ... d.php#L441

And the files added to the Swiftmailer library there:
https://github.com/aimeos/ai-swiftmaile ... t.php#L186

The problem must be a bug in the Swiftmailer library ...

Re: addAttachment to Payment E-Mail

Posted: 07 Nov 2018, 23:04
by stiller
as soon as I comment out the mime type query
line 450ff. in
https://github.com/aimeos/ai-client-htm ... d.php#L450
things work as expected.
also the logo

Code: Select all

client.html.email {
   email-logo = fileadmin/logo.png
}
is not beeing displayed for the same reason

Re: addAttachment to Payment E-Mail

Posted: 07 Nov 2018, 23:14
by aimeos
What's the mime type in the e-mail if it's determined by that functions and what without?

Re: addAttachment to Payment E-Mail

Posted: 09 Dec 2018, 00:13
by stiller
the following change in aimeos\Resources\Private\Extensions\ai-client-html\client\html\src\Client\Html\Email\Payment\Standard.php
line 449ff does solve it for us.
but of course it makes aimeos updates more difficult

Code: Select all

$mimetype = 'application/pdf';
$msg->addAttachment( $content, $mimetype, basename( $filename ) );

Re: addAttachment to Payment E-Mail

Posted: 10 Dec 2018, 19:54
by aimeos
Seems like the "finfo" PHP extension isn't installed on your server so Aimeos can't determine the mime type automatically.