ssmtech wrote:
> Thanks a lot for your reply,but i am little confused about what
> you are tring to tell me.Can you be a little more specific about it,some
> code enhancement or some thing
Your exception has this in it
"... javax.mail.SendFailedException: 554 <[EMAIL PROTECTED]>:..."
So it has the email address in it. So you parse it looking either for
"SendFailedException:" or just "<" and then extract the address from
there. To parse it you can use any of a variety of methods including
the indexOf() method of String, or StringTokenizer, or a regex engine
such as the one that comes with java 1.4.
> ----- Original Message -----
> From: "Joe Schell"
>
>
>
> >ssmtech wrote:
> >
> > >
> > > 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 solution seems obvious to me. Extract the email from the string
> >rather than the array.
> >
> >Presumably you are also aware that there is no guarantee that an email
> >was received just because you don't get an error correct?
> >
> >
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".