public URLAttachment(String url, String fileName, ContentDisposition contentDisposition) {
super();
byte[] bytes;
URLDataSource urlDataSource;
try {
urlDataSource = new URLDataSource(new URL(url));
bytes = new byte[urlDataSource.getInputStream().available()];
urlDataSource.getInputStream().read(bytes);
super.setFileName(fileName);
super.setMimeType(urlDataSource.getContentType());
super.setContentDisposition(contentDisposition);
super.setBytes(bytes);
} catch (MalformedURLException e) {
throw new MailException("Cant create attachment from URL", e);
} catch (IOException e) {