commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: [NET] adding attachment to SMTP
Date Tue, 19 Sep 2006 19:14:13 GMT

In message <9f066ee90609190720j481250b6kb7a4892ccf1c359@mail.gmail.com>, Mark w
rites:
>can someone help me out.  I am trying to attach a file to a mail
>message using commons.net and cannot figure it out.  Where can I find
>documentation or an example?

The org.apache.commons.net.smtp package provides only the means to
interact with the SMTP protocol.  It is not intended to provide
message assembly functionality.  You need to use another library that
allows you to assemble MIME messages; then you can send the message
with SMTPClient.  For especially large attachments, a library that
supports streaming the message to a java.io.Writer (used in conjunction
with sendMessageData()) instead of buffering it all in memory first
will be the most efficient.

daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message