Hi Richard
Cheers, I tried and still I can see the (to addresses) in the bcc email,
I even tried this simple email below and still I can see the to addresses
in the Bcc Email .. Any work around for this?
Thank you..
/***************************************************************************
**************************/
Properties props = System.getProperties();
// Setup mail server
props.put("mail.smtp.host", smtpHost);
// Get session
Session sessionI = Session.getDefaultInstance(props, null);
// Define message
MimeMessage message = new MimeMessage(sessionI);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
message.addRecipient(Message.RecipientType.BCC,
new InternetAddress(bcc));
message.setSubject("Hi");
message.setText("Mail test");
// Send message
Transport.send(message);
/**************************************************************/
----- Original Message -----
From: "Richard Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 2:57 PM
Subject: Re: JavaMail Bcc Not Working For Me
> Daniel,
> Check your code again. It looks like you are taking a list of recipients
> delimited by ';' and ',', parsing it into separate tokens, converting the
> individual addresses into Address[] and then using
> MimeMessage.addReceipients to add the individual addresses. You should
> either remove the loop and add all of the addresses at once using:
>
> if (bcc != null) {
> Address[] bccaddress = InternetAddress.parse(bcc);
> msg.addRecipients(Message.RecipientType.BCC, bccaddress);
> }
>
> or
>
> if (bcc != null) {
> strTokbcc = new StringTokenizer(bcc,";,");
> while(strTokbcc.hasMoreTokens()) {
> String strbcc = (strTokbcc.nextToken());
> Address bccaddress = new InternetAddress(strbcc);
> msg.addRecipient(Message.RecipientType.BCC, bccaddress);
> }
> }
>
> Regards,
>
> Richard
>
>
> At 09:53 AM 9/25/2002 +0700, you wrote:
> >Hi
> >
> >
> >//Set the BCC address of the Recipients
> > if (bcc != null) {
> > strTokbcc = new StringTokenizer(bcc,";,");
> > while(strTokbcc.hasMoreTokens()) {
> > String strbcc = (strTokbcc.nextToken());
> > Address[] bccaddress = InternetAddress.parse(strbcc);
> > msg.addRecipients(Message.RecipientType.BCC, bccaddress);
> > }
> > }
> >
> >I use this peice of code to send bcc for multiple bcc addresses in my my
> >mail application, But if I send I am able to
> >see the To information in the bcc address, which should not be seen,
> >
> >Can you tell me where I am wrong?
> >
> >Thanks in advance!
> >
> >Daniel.E
> >
>
>===========================================================================
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://archives.java.sun.com/jsp-interest.html
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.jsp
> > http://www.jguru.com/faq/index.jsp
> > http://www.jspinsider.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com