addAttachment to Payment E-Mail

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
stiller
Posts: 93
Joined: 05 Mar 2016, 15:59

addAttachment to Payment E-Mail

Post by stiller » 28 Aug 2018, 12:07

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

User avatar
aimeos
Administrator
Posts: 8262
Joined: 01 Jan 1970, 00:00

Re: addAttachment to Payment E-Mail

Post by aimeos » 03 Sep 2018, 09:39

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 93
Joined: 05 Mar 2016, 15:59

Re: addAttachment to Payment E-Mail

Post by stiller » 09 Sep 2018, 22:16

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?

User avatar
aimeos
Administrator
Posts: 8262
Joined: 01 Jan 1970, 00:00

Re: addAttachment to Payment E-Mail

Post by aimeos » 10 Sep 2018, 21:28

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 ...
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 93
Joined: 05 Mar 2016, 15:59

Re: addAttachment to Payment E-Mail

Post by stiller » 07 Nov 2018, 23:04

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

User avatar
aimeos
Administrator
Posts: 8262
Joined: 01 Jan 1970, 00:00

Re: addAttachment to Payment E-Mail

Post by aimeos » 07 Nov 2018, 23:14

What's the mime type in the e-mail if it's determined by that functions and what without?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 93
Joined: 05 Mar 2016, 15:59

Re: addAttachment to Payment E-Mail

Post by stiller » 09 Dec 2018, 00:13

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 ) );

User avatar
aimeos
Administrator
Posts: 8262
Joined: 01 Jan 1970, 00:00

Re: addAttachment to Payment E-Mail

Post by aimeos » 10 Dec 2018, 19:54

Seems like the "finfo" PHP extension isn't installed on your server so Aimeos can't determine the mime type automatically.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply