class MailService {

	private byte[] getFileContent(URL attachmentUrl) throws IOException {
        HttpURLConnection connection = (HttpURLConnection) attachmentUrl.openConnection();
        InputStream inputStream = connection.getInputStream();
       /* String filename = attachmentUrl.getFile();
        filename = filename.substring(filename.lastIndexOf('/') + 1);*/
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        IOUtils.copy(inputStream, baos);
        inputStream.close();
        baos.close();
		return baos.toByteArray();
	}

	@Autowired public  MailService(JavaMailSender mailSender, MailContentBuilderService mailContentBuilderService);

}