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