Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2006, 01:04 PM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default send secure email using bouncycastle

Hi,

  I need to send a digitally signed email with a pdf attachment.I am using bouncycastle for this.But I am having some problem while viewing the email sent .
1)If I set the text message(mimebodypart.setText("hello") and pdf file (using mimebodypart.setDataHandler(...))in same mimebody then the text message is missing in the email sent.

  Mail sent is shown as signed with correct signature
  PDF file is available as attachment and recepient is able to view it.
  But Text message is missing.

2)If I set the text message and attachment file in 2 different mimebodypart objects then I am getting an error while trying the view the mail using outlook express(Can’t open this item. Your Digital ID name can not be found by the underlying security system.)
SMIMESignedGenerator was used to generate the Multipart object.

My code looks like:

  mimebodypart.setText("hello");
mimebodypart2.setDataHandler() ->for setting file as attachment
  MimeMultipart mp= smimesignedgenerator.generate(mimebodypart,"BC");
  mp.addBodyPart(mimebodypart);
  mp.addBodyPart(mimebodypart2);

Can someone please help me?
Thanks in advance.







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send email abiye49 Excel VBA 1 January 10th, 2007 03:32 PM
Send by email tsimsha Classic ASP Databases 1 October 1st, 2005 03:03 AM
To send an email Danny_n BOOK: Excel 2003 VBA Programmer's Reference 0 January 12th, 2005 08:33 AM
Send email Danny_n BOOK: Excel 2003 VBA Programmer's Reference 0 January 12th, 2005 08:32 AM
send email X-Ken VS.NET 2002/2003 8 July 2nd, 2004 06:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.