i am sending the email using apache camel api.
public boolean sendEmail(JSONObject data)
{
boolean status=false;
camel = new DefaultCamelContext();
template = camel.createProducerTemplate();
Map<String, Object> map = new HashMap<String, Object>();
map.put("To",data.getString("toaddress"));
String body = data.getString("body");
map.put("Subject", data.getString("subject"));
map.put("From", "xxxxxxx@yahoo.com");
template.sendBodyAndHeaders("smtps://smtp.gmail.com?username=sxxx@gmail.com&password=ixxx", body, map);
status=true;
return status;
}
This code is working fine for sending single receipt as well as multiple receipt but the problem is that how do i know which email receipt is fail and for what reason.i am new in apache camel so i do not know whether apache camel is proving or not?