assertEquals( workItem.getParameter( "To" ), ((InternetAddress)msg.getRecipients( RecipientType.TO )[0]).getAddress() );
assertEquals( workItem.getParameter( "Cc" ),((InternetAddress)msg.getRecipients( RecipientType.CC )[0]).getAddress() );
}
public void FIXME_testMultipleToWithSingleCCAndBCC() throws Exception {
EmailWorkItemHandler handler = new EmailWorkItemHandler();
handler.setConnection( emailHost, emailPort, null, null );
WorkItemImpl workItem = new WorkItemImpl();
workItem.setParameter( "To", "person1@domain.com; person2@domain.com" );
workItem.setParameter( "Cc", "person3@domain.com; person4@domain.com" );
workItem.setParameter( "Bcc","person5@domain.com; person6@domain.com" );
workItem.setParameter( "From", "person4@domain.com" );
workItem.setParameter( "Reply-To", "person5@domain.com" );
workItem.setParameter( "Subject", "Subject 1" );
workItem.setParameter( "Body", "Body 1" );
WorkItemManager manager = new DefaultWorkItemManager(null);
handler.executeWorkItem( workItem, manager );
assertEquals( 6, wiser.getMessages().size() );
List<String> list = new ArrayList<String>(6);
list.add( wiser.getMessages().get( 0 ).getEnvelopeReceiver() );