I need to integrate mail service in my application. My application should send the email, which has to attach a .pdf file (detailed report). PDF file is now at remote server.
Can anyone help me to understand how to send mail with pdf attachment in blackberry? If, it is feasible to implement then how would i go with this?
Below are the links, I have got from Blackberry knowledge base forum for sending mail in blackberry
I believe this is the updated version of the first link in your question.
In your case, you want to send a PDF document, so you would replace the content-type with
application/pdf, and the filename could beDetailedReport.pdf, or whatever you like. This filename is not a full path. Just a name that will be seen by the recipient of the email.The
byte[]is something you have to read in yourself, opening the local pdf file (wherever you stored it). It’s just the binary data from the file, so I’d use aDataInputStream:And of course, I would recommend doing this work on a background thread to avoid freezing your UI.