Discussion:
Exception even if one email address is wrong
Devesh Pradhan
2008-12-23 12:51:46 UTC
Permalink
Hi,

I am using Transport.send(msg) to send mail. I have correct address in TO
List but may get invalid email ids in the CC mail id. Java Mail API is not
sending the mail even to the TO recipient incase of wrong CC mail id.
Is it normal behaviour of Java Mail API or there is a way to tweak it in a
manner so that atleast mail goes to the valid addresses atleaset.

Regards,
Devesh

===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Bill Shannon
2008-12-24 00:26:50 UTC
Permalink
Post by Devesh Pradhan
Hi,
I am using Transport.send(msg) to send mail. I have correct address in TO
List but may get invalid email ids in the CC mail id. Java Mail API is not
sending the mail even to the TO recipient incase of wrong CC mail id.
Is it normal behaviour of Java Mail API or there is a way to tweak it in a
manner so that atleast mail goes to the valid addresses atleaset.
Yes, that's normal. If one of the addresses has been typed incorrectly,
the user might want the chance to correct the typing error before really
sending the message.

If that's not what you want to do, there's a property you can set to tell
it to send the message even if some of the addresses are invalid. See the
javadocs for the com.sun.mail.smtp package.

===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Devesh Pradhan
2009-01-06 15:06:13 UTC
Permalink
Hi,

When we create object of InternetAddress then itself there is a kind of validation on Email Ids( like space or invalid domain).

If we are using InternetAddress , then do we need to use sendPartial property since we would have caught the exception much earlier then calling the send function. Is there any kind of exception that may not be caught by InternetAddress constructor.

Please refer to me for any link if you feel my observation is invalid. Thanks for time.


Regards,
Devesh
Subject: Re: Exception even if one email address is wrong
Date: Wednesday, December 24, 2008, 5:56 AM
Post by Devesh Pradhan
Hi,
I am using Transport.send(msg) to send mail. I have
correct address in TO
Post by Devesh Pradhan
List but may get invalid email ids in the CC mail id.
Java Mail API is not
Post by Devesh Pradhan
sending the mail even to the TO recipient incase of
wrong CC mail id. Is it normal behaviour of Java Mail API or
there is a way to tweak it in a
Post by Devesh Pradhan
manner so that atleast mail goes to the valid
addresses atleaset.
Yes, that's normal. If one of the addresses has been
typed incorrectly,
the user might want the chance to correct the typing error
before really
sending the message.
If that's not what you want to do, there's a
property you can set to tell
it to send the message even if some of the addresses are
invalid. See the
javadocs for the com.sun.mail.smtp package.
===========================================================================
include in the body
of the message "signoff JAVAMAIL-INTEREST". For
general help, send email to
message "help".
===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Devesh Pradhan
2009-01-06 15:11:49 UTC
Permalink
Kindly ignore this mail. My sincere apologies for the same.

Regards,
Devesh
Subject: Re: Exception even if one email address is wrong
Date: Tuesday, January 6, 2009, 8:36 PM
Hi,
When we create object of InternetAddress then itself there
is a kind of validation on Email Ids( like space or invalid
domain).
If we are using InternetAddress , then do we need to use
sendPartial property since we would have caught the
exception much earlier then calling the send function. Is
there any kind of exception that may not be caught by
InternetAddress constructor.
Please refer to me for any link if you feel my observation
is invalid. Thanks for time.
Regards,
Devesh
--- On Wed, 12/24/08, Bill Shannon
Subject: Re: Exception even if one email address is
wrong
Date: Wednesday, December 24, 2008, 5:56 AM
Post by Devesh Pradhan
Hi,
I am using Transport.send(msg) to send mail. I
have
correct address in TO
Post by Devesh Pradhan
List but may get invalid email ids in the CC mail
id.
Java Mail API is not
Post by Devesh Pradhan
sending the mail even to the TO recipient incase
of
wrong CC mail id. Is it normal behaviour of Java Mail
API or
there is a way to tweak it in a
Post by Devesh Pradhan
manner so that atleast mail goes to the valid
addresses atleaset.
Yes, that's normal. If one of the addresses has
been
typed incorrectly,
the user might want the chance to correct the typing
error
before really
sending the message.
If that's not what you want to do, there's a
property you can set to tell
it to send the message even if some of the addresses
are
invalid. See the
javadocs for the com.sun.mail.smtp package.
===========================================================================
and
include in the body
of the message "signoff JAVAMAIL-INTEREST".
For
general help, send email to
message "help".
===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Loading...