DRDx to Drdx Home


<%@page import="nl.captcha.Captcha" %> <%@page import="javax.mail.*"%> <%@page import="javax.mail.internet.*"%> <%@page import="javax.activation.*"%> <%! private String name = null; private String eMail = null; private String phone = null; private String subject = null; private String message = null; private String mailContent; private String warningMessage; private boolean hasWarning; private boolean isSubmitted; private boolean isSent; private boolean sendMail(String smtpHost, String fromAddress, String toAddress, String subject, String message) { boolean retval = false; try { java.util.Properties props = new java.util.Properties(); props.put("mail.smtp.host", smtpHost); Session mailSession = Session.getDefaultInstance(props, null); Message htmlMessage = new MimeMessage(mailSession); htmlMessage.setFrom(new InternetAddress(fromAddress)); htmlMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(toAddress)); htmlMessage.setSubject(subject); htmlMessage.setContent(message, "text/html"); Transport.send(htmlMessage); retval = true; } catch (Exception e) { e.printStackTrace(); } return retval; } private boolean isEmailValid(String address) { boolean retval = false; int dot; int at; if (address != null) { address = address.trim(); at = address.indexOf('@'); if (at >= 2) { dot = address.indexOf('.', at); if (dot >= at+2 && address.length() >= dot+2) { retval = true; } } } return retval; } private String getParameter(HttpServletRequest request, String parameterName) { String retval = request.getParameter(parameterName); if (retval == null) { retval = ""; } return retval; } %> <% name = getParameter(request, "name"); eMail = getParameter(request, "eMail"); phone = getParameter(request, "phone"); subject = getParameter(request, "subject"); message = getParameter(request, "message"); warningMessage = ""; mailContent = ""; isSent = false; hasWarning = false; isSubmitted = (request.getParameter("send") != null); if (isSubmitted) { boolean isFlood = true; Captcha captcha = (Captcha) session.getAttribute(Captcha.NAME); request.setCharacterEncoding("UTF-8"); // Do this so we can capture non-Latin chars String answer = request.getParameter("captcha"); if (answer != null) { if (captcha != null) { isFlood = !captcha.isCorrect(answer); } } if (name.isEmpty()) { warningMessage += "Your name
"; } if (eMail.isEmpty()) { warningMessage += "Your E-Mail address
"; } else if (isEmailValid(eMail) == false) { warningMessage += "Please enter a correct E-Mail address.
"; } if (subject.isEmpty()) { warningMessage += "Subject
"; } if (message.isEmpty()) { warningMessage += "Message
"; } if (isFlood) { warningMessage += "Incorrect access code. Please try again.
"; } hasWarning = !warningMessage.isEmpty(); if (!hasWarning && !isFlood) { mailContent += "Name: "+name+"
"; mailContent += "E-Mail: "+eMail+"
"; mailContent += "Phone: "+phone+"
"; mailContent += "Subject: "+subject+"
"; mailContent += "Message:
"+message+"
"; isSent = sendMail("localhost", "server@www.drugresponsedx.com", "info@drugresponsedx.com", "www.drugresponsedx.com - Contact form", mailContent); } } %> <% if(!hasWarning && isSent) { %>

Your mail has been sent:

<%= mailContent %>

<% session.invalidate(); } else { %>

Contact Persons


Dr. Zoltán Konthur, managing director
Tel: +49 (0) 3302 55199 85


E-mail Contact:


Please fill in the contact form, and we will contact you as soon as possible.
(* fields are mandatory )

<% if (hasWarning){ %>

Please fill in the required fields:

<%= warningMessage %>


<% } %>



















<% } %>

News – Press – Events


29. January, 2014

Drug Response Dx GmbH is presenting at the Theragnostics-Workshop of the High-Tech Partnering Conference

more

27. – 30. January, 2014

The Drug Response Dx GmbH is represented on the Arab Health 2014 at the Dubai

more

11. December, 2013

Drug Response Dx GmbH has been certified