![]() StrResult = "\tMail operation Failed. ![]() tFileName(" Answers.pdf") // set FILENAME "\tError in sending file not been able to attach. tDataHandler(new DataHandler(new ByteArrayDataSource(pdf.toString(), "application/pdf"))) MimeMultipart mimemultipart = new MimeMultipart() MimeBodyPart mimebodypart = new MimeBodyPart() MimeMessage mimemessage = new MimeMessage(session) String mailfrom = " mailto = " ccmailid = " subject = "hello" Session session = Session.getInstance(props, loAuthenticator) Props.put("", " ") Īuthenticator loAuthenticator = new MailAuthenticator() With smart unsubscribes, custom swipes, and more, Edison Mail makes cleaning your inbox easy. Delete old messages, large attachments and unsubscribe. Properties props = System.getProperties() Integrate Edison Mail with your email accounts and platforms and clean out your crowded inboxes in no time flat. Public void sendAnswersToAdministrator(HttpServletResponse response, Document pdf) SendAnswersToAdministrator(response,document) String answersCorrect = blankAnswers.toString() Ĭell = new PdfPCell(new Paragraph(st.nextToken())) But the recipient does not get the mail at all and nor does it show in the Sent folder on my iPhone. I get the whoosh sound indicating that the mail is sent. Since the last iOS update the mail app on my iPhone X is not sending emails with a photo, screenshot or pdf attachments. (StringBuffer) session.getAttribute("blankanswers") Mail app not sending email with attachment like photo/pdf. HttpSession session = request.getSession() PdfWriter.getInstance(document, response.getOutputStream()) Ĭell = new PdfPCell(new Paragraph("Answers")) Ĭell.setBackgroundColor(new Color(34, 90, 141)) HttpServletResponse res = request.getServletResponse(true) create a document with certain page sizeĭocument document = new Document(PageSize.A4) Please find the code for the same and let me know where i am doing wrong Please understand the exact problem and send me the pointers. I created a pdf document on fly using itext(open source) and was able to send that pdf document using java mail API.But i am getting a problem while opening that pdf in my mailĮxception i am getting while opening the pdf isĪdobe reader could not open ' Answers.pdf' because it is either not a supported file type or because the file has been damaged(for example ,it was sent as an attachment and was not correctly decoded)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |