You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2006/09/19 21:14:13 UTC

Re: [NET] adding attachment to SMTP

In message <9f...@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