• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mime message type issue  RSS feed

 
ruba sampath
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

how to clear the Mime message list added in the below code

MimeMessage message;
message.addRecipient('','');
message.addRecipient('','');
Transport.send(message);

this code is executed inside the loop. As it is being repeated mail has been sent to more no of users. kindly help how to clear this list each time.
 
Swastik Dey
Rancher
Posts: 1782
14
Android Eclipse IDE Java Java ME
 
ruba sampath
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Thanks for your reply. But still i didnt find the solution. The link shows only API which is not useful for me. I dont know how to clear the list for each iterate.



 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this?
Or even better:
Using null instead of an empty Address[] is only guaranteed to work for MimeMessage, not Message, as MimeMessage explicitly mentions in its Javadoc that it's allowed. The cast (which can also be to Address[]) is needed to avoid ambiguity.
 
ruba sampath
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks a lot.. Its working fine now....


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!