import java.util.HashMap; import java.util.Map; import com.adeptia.indigo.event.mailtrigger.MessageDigest; import com.adeptia.indigo.event.mailtrigger.MailEvent; import com.adeptia.indigo.event.timetrigger.TimerEvent; import com.adeptia.indigo.system.IndigoConfig; import java.io.File; import com.adeptia.indigo.services.ServiceException; import com.adeptia.indigo.utils.IndigoPathUtils; Map eventMap = context.get("EventContextMap"); MessageDigest mailMessage = (MessageDigest)eventMap.get("mailMessage"); String senderEmailID = mailMessage.getSenderEmail(); String mailSubject = mailMessage.getMailSubject(); String uniqueId = mailMessage.getUniqueId(); context.put("uniqueId",uniqueId); String eventTypedID = (String)eventMap.get("EventID"); String eventIdType = ""; String eventIdTypedID = ""; eventIdType = eventTypedID.substring(0,eventTypedID.lastIndexOf(":")); eventIdTypedID = eventTypedID.substring(eventTypedID.lastIndexOf(":")+1,eventTypedID.length()); MailEvent mailevent = IndigoConfig.getEntity(eventIdTypedID,MailEvent.class); String host = mailevent.getHostName(); String username = mailevent.getMailUserId(); String password = mailevent.getMailPassword(); String domain = mailevent.getDomain(); String protocol = mailevent.getProtocol(); int port = mailevent.getPort(); String sourceFileName="*"; String msgPart = "Multipart"; String cdoMachine = null; boolean secure = true; int[] messageNumber = null; boolean newMessage = true; boolean leaveCopyOnServer = true; String bodyContentType = "text/plain"; boolean ignoreCase = false; context.put("username",username); context.put("host",host); context.put("protocol",protocol);