Sending an Attachment using SMTP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Sending an Attachment using SMTP

Hybrid View

  1. #1
    GeneT Guest

    Sending an Attachment using SMTP


    I am sending an email as part of the Java module using SMTP. I have everything
    working except figuring out how to include an attachment. Does anyone have
    any suggestions?

    Thanks

  2. #2
    Paul Clapham Guest

    Re: Sending an Attachment using SMTP

    If you are using the JavaMail product (which you can download from Sun's
    Java Developer site) it has methods for including attachments and examples
    of how to do it. If you are using raw SMTP then I don't know how.

    PC2

    "GeneT" <gene.thomaier@bcbsfl.com> wrote in message
    news:3caaff3e$1@10.1.10.29...
    >
    > I am sending an email as part of the Java module using SMTP. I have

    everything
    > working except figuring out how to include an attachment. Does anyone

    have
    > any suggestions?
    >
    > Thanks




  3. #3
    GeneT Guest

    Re: Sending an Attachment using SMTP


    I am using raw SMTP.

    "Paul Clapham" <pclapham@core-mark.com> wrote:
    >If you are using the JavaMail product (which you can download from Sun's
    >Java Developer site) it has methods for including attachments and examples
    >of how to do it. If you are using raw SMTP then I don't know how.
    >
    >PC2
    >
    >"GeneT" <gene.thomaier@bcbsfl.com> wrote in message
    >news:3caaff3e$1@10.1.10.29...
    >>
    >> I am sending an email as part of the Java module using SMTP. I have

    >everything
    >> working except figuring out how to include an attachment. Does anyone

    >have
    >> any suggestions?
    >>
    >> Thanks

    >
    >



  4. #4
    Join Date
    Mar 2005
    Posts
    22
    To send an attachment you will need to create a multipart MIME message that contains the attachment as a separate part. This is well documented in RFC 1521.

    For a tutorial see the following:

    http://www.jscape.com/articles/sendi...sing_java.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center