public void addAttachment(final byte[] content, final String filename, final String mimetype)
		throws MessagingException
	{
		final DataSource dataSource = new ByteArrayDataSource(content, mimetype);
		final DataHandler dataHandler = new DataHandler(dataSource);
		addAttachment(dataHandler, filename);
	}
public void addAttachment ( final byte [ ] content , final String filename , final String mimetype ) throws MessagingException { final DataSource dataSource = new ByteArrayDataSource ( content , mimetype ) ; final DataHandler dataHandler = new DataHandler ( dataSource ) ; addAttachment ( dataHandler , filename ) ; }
Adds the attachment.

@param content
The bytearray with the content.
@param filename
The new Filename for the attachment.
@param mimetype
The mimetype.

@throws MessagingException
is thrown if the underlying implementation does not support modification of
existing values