|
Hello Sir,
I am
working on an Enterprise Java Bean Application running on J2EE application
server..Also using JavaMail API to send Emails through my application.
I am able to send emails successfully through it and sending
it into a loop one after the other...
What i am tring to do is, if i encounter an Invalid Email
Address the application throws me an SendFailedException and
from this SendFailedException i want to catch Invalid Email
Addresses... so that i will come to know which emails where sent and which were
not...
But the
problem is that ,if an Invalid Email Address is encountered and
after throwing me an SendFailedException if i try to Catch the Invalid
Address ,like
Address[] invalid =
sfe.getInvalidAddresses();
and print an SOP after this,
System.out.println("Collected InvalidAddress from
SendFailedException...."+invalid);
the SOP prints "Null"
...
The Invalid Email Address is also an well Formed
String....e.g... "[EMAIL PROTECTED]"...
The complete Exception is
.....
The exception is javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: 554 <[EMAIL PROTECTED]>: Recipient address rejected: Domain not found The Code is .. <Code> MimeMessage msg = new
MimeMessage(session); ArrayList al = new
ArrayList(); </Code>
Can anybody help me out with this problem.Any suggestion or code can be greatly appreciated... Thanks a million is advance... Regards Sam |
