Okay, but it's not really fixed my code. However, it makes me think there is some documentation or news regarding the limit. I found it here. So, I decided to ask Amazon Q to increase the attachment limit.
Of course, the issue still exists; it seems the PDF has been corrupted when sending the email. I've checked the size when downloading, it has the correct size. But the attached file size was doubled. So, I decided to ask Amazon Q to compress it.
Very unfortunate, I can't open the zip file! So, I think the bug occurs when sending the base64 data, which introduces a corrupted file.
I hope it will be fixed when I identify the SDK with Amazon Q later. But not now, sorry.
Copyright (C) 2022 Bervianto Leo Pratama
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Voila! I fixed it just by providing ContentTransferEncoding = "BASE64". The SDK always converts my file to base64, but the encoding was being set to SEVEN_BIT. Of course, it's not matched encoding!