File attachments (image/png): Fix issue with sending email
Posted: 21 Nov 2020, 17:51
Hello!
Getting the following error when sending emails through AWS.
The problem is visible in the original letter (as some servers miss this error). The file type and name are confused:
aimeos/Resources/Private/Extensions/ai-typo3/lib/custom/src/MW/Mail/Message/Typo3.php
The line:
Replaced by:
The email content now has the correct values and the email is sent with images attached.
Getting the following error when sending emails through AWS.
In my case (TYPO3v9.x, Aimeos-v20.x), I am getting an error while sending the order email. Since there is a logo in the letter layout.554 Transaction failed: Expected '/', got ; (in reply to end of DATA command))
The problem is visible in the original letter (as some servers miss this error). The file type and name are confused:
The problem is solved by fixing the error in the file extension code:Content-Type: aimeos.png; name="image/png"
Content-Transfer-Encoding: base64
Content-ID: <f93088b537466e83f6d6cf0e03474c84@shop.v9>
Content-Disposition: inline; filename="image/png"
aimeos/Resources/Private/Extensions/ai-typo3/lib/custom/src/MW/Mail/Message/Typo3.php
The line:
Code: Select all
public function embedAttachment( string $data, string $mimetype, string $filename ) : string
{
....
$part = \Swift_EmbeddedFile::newInstance( $data, $mimetype, $filename );
....
}
Code: Select all
public function embedAttachment( string $data, string $mimetype, string $filename ) : string
{
....
$part = \Swift_EmbeddedFile::newInstance( $data, $filename, $mimetype );
....
}
Thanks for your hard work. Always happy to help)))Content-Type: image/png; name=aimeos.png
Content-Transfer-Encoding: base64
Content-ID: <c05c8b9a10beed55ff845f6721252473@swift.generated>
Content-Disposition: inline; filename=aimeos.png