urgent about java mail
I have the code below that sends html file however it does not send the reference to the images in its relative path. I do not want to use apsolute paths to images on the live site.
Anyone one know a qick way in addition to this code of doing it
InternetAddress to =new InternetAddress("info@ddsds.uk");
MimeMessage message =new MimeMessage(s);
message.setFrom(from);
message.addRecipient(Message.RecipientType.TO, to);
BufferedReader streamIn =new BufferedReader(new FileReader(new File("/marketing/email.html")));
String htmltext;
String body="";
while ((htmltext= streamIn.readLine()) !=null){
body+=htmltext;
}
message.setSubject("Customer Enquiry");
message.setContent(body,"text/html");
Transport.send(message);

