I need to send email with attachment from producer server to a consumer
server.  On the producer server, a file (PDF, MS Doc, etc.) is loaded as
attachment, together with addressTo, addressFrom, subject, etc. are sent to
ActiveMQ.  The consumer server needs to grab all those contents, forms a
javax.mail.Message object, and transport that mail message to its
destinations.

On the producer server side, I have MyMessage like:

public class MyMessage implements Serializable {
    static final long serialVersionUID = 4916853063597487545L;
    private String addressTo;
    private String addressFrom;
    private String text;
    private byte[] attachment;
    private String subject;
    private Vector cc;
    //Bean methods follows.
}
Is it okey to load the file into the byte[] array attachment and send the
object to ActiveMQ?

If okey, could someone show me code snipet on the consumer server side to
form a MultiPart java mail message using MyMessage bean?
-- 
View this message in context: 
http://www.nabble.com/MimeBodyPart-attachment-tp14896184s2354p14896184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to