A
Adam Lipscombe
Folks,
I am using java mail to send out file attachments. A code snippet is:
-----------
String attachmentPath = "C:\temp\MyFile.txt";
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(attachmentPath);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(attachmentPath);
-----------
But when the file arrives in the email and the user tries to save it, the file name that is
presented is a munged version of the full path. e.g. "c--temp-MyFile.txt"
I would like the email client to present simply "MyFile.txt".
Is there anyway I can achieve this?
TIA -Adam
I am using java mail to send out file attachments. A code snippet is:
-----------
String attachmentPath = "C:\temp\MyFile.txt";
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(attachmentPath);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(attachmentPath);
-----------
But when the file arrives in the email and the user tries to save it, the file name that is
presented is a munged version of the full path. e.g. "c--temp-MyFile.txt"
I would like the email client to present simply "MyFile.txt".
Is there anyway I can achieve this?
TIA -Adam