I dunno... you might want to have a look at this tutorial for example, which looks much like your code but has some minor (but possibly significant) differences.
Versha Agarwal wrote:I am sending attachment from Yahoo server ..
To be clear: you are sending the from a Java application through Yahoo, and somehow retrieving the email - is that correct?
How are you retrieving/viewing the email (the message that you included in your post) - do you have another Java application, are you using an email client?
Versha Agarwal wrote:I am sending attachment from Yahoo server ..
To be clear: you are sending the from a Java application through Yahoo, and somehow retrieving the email - is that correct?
How are you retrieving/viewing the email (the message that you included in your post) - do you have another Java application, are you using an email client?
Versha Agarwal wrote:I am sending attachment from Yahoo server ..
To be clear: you are sending the from a Java application through Yahoo, and somehow retrieving the email - is that correct?
How are you retrieving/viewing the email (the message that you included in your post) - do you have another Java application, are you using an email client?
Versha Agarwal wrote:I am sending attachment from Yahoo server ..
To be clear: you are sending the from a Java application through Yahoo, and somehow retrieving the email - is that correct?
How are you retrieving/viewing the email (the message that you included in your post) - do you have another Java application, are you using an email client?
Yahho to yahho is working fine.
But if recipient is gmail/rediff or any other it is not working.
Even I tried ByteArrayDataSource too. Same problem persists.
byte[] bFile = Files.readAllBytes(new File(path).toPath());
messageBodyPart.setDataHandler(new DataHandler(new ByteArrayDataSource(bFile, "application/pdf")) );
multipart.addBodyPart(messageBodyPart);
Paul Clapham wrote:I dunno... you might want to have a look at this tutorial for example, which looks much like your code but has some minor (but possibly significant) differences.