I am sending email through Java using com.sun.mail.smtp.SMTPTransport.
I am successful to send the email, but SMTPTransport not giv
The only way to confirm an email address is to send an email to it and require the user to follow a (unique) link in the email back to your website.
Thank you all for your responses.
I am able to solve my problem through MX Record checking .
I used this Link to resolve the problem. May this also be useful for someone.
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial",
"com.sun.jndi.dns.DnsContextFactory");
DirContext ictx = new InitialDirContext( env );
Attributes attrs = ictx.getAttributes
( hostName, new String[] { "MX" });
Attribute attr = attrs.get( "MX" );
if (( attr == null ) || ( attr.size() == 0 )) {
attrs = ictx.getAttributes( hostName, new String[] { "A" });
attr = attrs.get( "A" );
if( attr == null )
throw new NamingException
( "No match for name '" + hostName + "'" );
}
Thank you.