Our service send email with attachment which is not visible on ios devices.
AWS team suggested to add double quotes around file name but when i try to add ", MimeBodyPart turning into escape character.
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setDisposition(Part.ATTACHMENT);
messageBodyPart.setDataHandler(new DataHandler(Base64.getMimeDecoder()
.decode(attachment.getAttachment()), attachment.getContentType()));
messageBodyPart.setFileName("\""+ attachment.getName()+"\"");
From: [email protected] To: [email protected] Message-ID: <962944318.2.1571250351443@[10.200.78.179]> Subject: subject for test MIME-Version: 1.0 Content-Type: multipart/related;
boundary="----=_Part_1_977674685.1571250351337"------=_Part_1_977674685.1571250351337 Content-Type: multipart/alternative;
boundary="----=_Part_0_474488818.1571250351334"------=_Part_0_474488818.1571250351334 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi your email send is success ------=_Part_0_474488818.1571250351334--
------=_Part_1_977674685.1571250351337 Content-Type: application/pdf; name="\"myData.pdf\"" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="\"myData.pdf\""
ICAgICAgICAgDXhyZWYNNCAxMQ0wMDAwMDAwMDE2IDAwMDAwIG4NCjAwMDAwMDA2NjAgMDAwMDAg ------=_Part_1_977674685.1571250351337--