title: How to check mail address is exists or not?
body: <p>I am sending email through Java using <strong>com.sun.mail.smtp.SMTPTransport</strong>.</p>
  
  <p>I am successful to send the email, but <strong>SMTPTransport</strong> not giving any error if I send the mail to invalid email address.</p>
  
  <p><strong>Is there a way to check that given mail address is exists or not?</strong></p>
  
  <p>I dont mean to check the mail address as <strong>client side</strong>, I need to check as <strong>server side</strong>.</p>
  
  <p>I found many questions like this on many forums but I am not getting any proper solutions.</p>
  
  <p>My Code is - </p>
  
  <pre><code>String email = "reciever@theirDomain.com";
  
  Properties props = new Properties();
  props.put("mail.smtps.host", "mail.myDomain.com");
  props.put("mail.smtps.auth", "true");
  Session session = Session.getInstance(props, null);
  
  MimeMessage msg = new MimeMessage(session);
  msg.setFrom(new InternetAddress("Mail Demo &lt;my_email@myDomain.com&gt;"));
  msg.setRecipients(Message.RecipientType.TO, email);
  msg.setSubject("Mail Example");
  msg.setSentDate(new Date(System.currentTimeMillis()));
  
  String txt = "Message Body";
  
  msg.setText(txt);
  SMTPTransport st = (SMTPTransport)session.getTransport("smtps");
  st.connect("mail.myDomain.com","my_email@myDomain.com","password");
  st.sendMessage(msg, msg.getAllRecipients());
  
  System.out.println("ServerResponse : " + st.getLastServerResponse());
  </code></pre>
  
  <p>It gives output for both valid and invalid email_address :-
  <strong>250 OK id=1TbWgN-0007oY-8r</strong></p>
  
  <p>Please help me to resolve the problem.
  Thanks in advance.</p>