dcsimg
Multiple Recipients, TO field only show the last email?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hey_Arnold
Posted On:   Monday, July 30, 2001 08:39 AM

I'm trying to email to multiple recipients. Here's a clip of the code: InternetAddress[] toAddress = InternetAddress.parse(to); for(int i=0; i msg.addRecipients(Message.RecipientType.TO, toAddressp[i].getAddress()); } I can send emails to multiple recipient OK, in the TO field of the message that gets sent, it always displays that LAST email address in my array? Why didn't it display the TO field to each recipient's emails? For example this is what the recipient get in the email: Subject: 1 doct! Date: Mon, 30 Jul 2001 11:22:58 -0400 (EDT) From: myemail@blah.com To: recipient2@mail.com the TO    More>>

I'm trying to email to multiple recipients. Here's a clip of the code:



			
InternetAddress[] toAddress = InternetAddress.parse(to);
for(int i=0; i
msg.addRecipients(Message.RecipientType.TO, toAddressp[i].getAddress());
}



I can send emails to multiple recipient OK, in the TO field
of the message that gets sent, it always displays that LAST email address in my array?
Why didn't it display the TO field to each recipient's emails?


For example this is what the recipient get in the email:

			
Subject: 1 doct!
Date: Mon, 30 Jul 2001 11:22:58 -0400 (EDT)
From: myemail@blah.com
To: recipient2@mail.com


the TO field should display both recipient1@mail.com, and recipient2@mail.com






thanks!    <<Less

Re: Multiple Recipients, TO field only show the last email?

Posted By:   Hey_Arnold  
Posted On:   Monday, July 30, 2001 09:13 AM

AAA
okie nevermind i have found the answer myself.
take out the for-loop!!!
anduse only

InternetAddress[] toAddress = InternetAddress.parse(to);
msg.addRecipients(Message.RecipientType.TO, toAddress);
About | Sitemap | Contact