email.send("suporte@dot.ist.utl.pt","Localhost Error Report",stackTrace.toString());
email.send("suporte@dot.ist.utl.pt","Localhost Error Report",mailBody);
	public ActionForward sendEmail(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception {		HttpSession session = request.getSession(false);				ActionMapping originalMapping =			(ActionMapping) session.getAttribute(				SessionConstants.ORIGINAL_MAPPING_KEY);		DynaActionForm emailForm = (DynaActionForm) form;		String formEmail = (String) emailForm.get("email");		String formSubject = (String) emailForm.get("subject");		String formBody = (String) emailForm.get("body");		StackTraceElement[] stackTrace =			(StackTraceElement[]) session.getAttribute(				SessionConstants.EXCEPTION_STACK_TRACE);		String requestContext= (String) session.getAttribute(SessionConstants.REQUEST_CONTEXT);		String sender = "Sender: " + formEmail;		String subject = "Error Report - " + formSubject;		String mailBody = "Error Report\n\n";		mailBody += sender +"\n\n";		mailBody += "User Comment: \n" + formBody + "\n\n";		mailBody += "Error Origin: \n";		mailBody += "Exception: \n" + session.getAttribute(Globals.EXCEPTION_KEY) + "\n\n";		mailBody += "RequestContext: \n" + requestContext + "\n\n\n";		mailBody += "SessionContext: \n" + sessionContextGetter(request) + "\n\n\n";		mailBody += "Path: " + originalMapping.getPath() + "\n";		mailBody += "Name: " + originalMapping.getName() + "\n";		mailBody += stackTrace2String(stackTrace);			EMail email =null;				if (!request.getServerName().equals("localhost")) { 			email = new EMail("mail.adm", "erro@dot.ist.utl.pt");			email.send("suporte@dot.ist.utl.pt","Fenix Error Report",stackTrace.toString());		}				else{ email = new EMail("mail.rnl.ist.utl.pt", "erro@dot.ist.utl.pt");			email.send("suporte@dot.ist.utl.pt","Localhost Error Report",stackTrace.toString());		}					email.send("suporte@dot.ist.utl.pt","Error Report",stackTrace.toString());//		email.send("j.mota@netcabo.pt", subject, mailBody);//		email.send("lepc@mega.ist.utl.pt", subject, mailBody);		//		removes from session all the un-needed info		sessionRemover(request);								ActionForward actionForward = originalMapping.getInputForward();		RequestUtils.selectModule(				originalMapping.getModuleConfig().getPrefix(),				request,				this.servlet.getServletContext());						actionForward.setPath(actionForward.getPath());						return actionForward;	}