• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem With Sending Mails With an Attachment  RSS feed

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have successfully used the JavaMail API to send e-mails from one address to another.

Now, I am working on sending e-mails with an attachment

I uploaded a file in my PC as an attachment:

I then retrieve the file and the file name:

I think the problem happens here:


250 HELP
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<reedr-c@myOrg.org>
250 reedr-c@myOrg.org Sender Ok
RCPT TO:<jenc-c@myOrg.org>
250 jenc-c@myOrg.org Recipient Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: jenc-c@myOrg.org
DATA
354 Enter mail, terminate with "." alone on a line
Message-ID: XXXXX
From: reedr-c@myOrg.org
To: jenc-c@myOrg.org
Subject: Testing
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_31639999.1098370206792"

------=_Part_0_31639999.1098370206792
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

It is a test
------=_Part_0_31639999.1098370206792
Content-Type: application/octet-stream; name="Blank Timecard.doc"
Content-Transfer-Encoding: base64
java.io.FileNotFoundException: Blank Timecard.doc (The system cannot find the file specified)
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OKay, I have figured out how to do it. Thanks anyway.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!