Given below is the stacktrace :
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 <cafe...@hotmail.com>...
Relaying denied
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at dev.app.EmailApp.sendMail(EmailApp.java:328)
thanks
rc
Completely aside from Java programming, "Relaying denied" comes
up when someone not a member of domain A tries to send mail
through domain A's mail server to someone in domain B, where that
someone in domain B is also outside of domain A.
So I wonder if you are not sending to a list of addresses, one of
which is not permitted to "go" due to relaying being denied?
Try catching the exception, then log the address which caused it
to fail, then check it against the above possibility.
HTH. Bob L.
--
Robert Lynch Berkeley CA USA rml...@pacbell.net
>
>javax.mail.SendFailedException: Sending failed;
> nested exception is:
> javax.mail.SendFailedException: Invalid Addresses;
> nested exception is:
> javax.mail.SendFailedException: 550 <cafe...@hotmail.com>...
>Relaying denied
Doesn't "Relaying denied" mean your ISP's SMTP server doesn't allow relaying?
i.e., if the email address in "From" (or "To") header is not in the domain, some
SMTP servers will reject the post.
I am not sure, but a couple of years ago I tried to send email through
smtp.idt.net, but the address in "From" header was not balb...@idt.net, and
the response I got was "Relaying denied."
Just a pseudo-random thought, hope it helps.
-Wayne Pollock
The "550 Relaying denied" error is certainly coming from the SMTP server which
indicates that it is refusing to relay the mail for the addressee. Can you give
some more details regarding the error such as
a) The smtp server to whom you're trying to connect to
b) The To: address
c) The envelope From: address
A lot of SMTP providers are quite wary about relaying mail these days
(rightly so) to avoid misuse by spammers.
Kala
>rc wrote:
>>
>> The "To" address is outside the domain of the originating mail server, but the
>> "From" address is within the the domain of the sending mail server. If the
>> originating mailServer is "mail.server.net.com" for example, then the "from" is
>> emailA...@server.net.com.
>> But if it were an unauthorised/incorrect email address in the "from" / "to" / "cc"
>> field why would the exception be intermittent for the same email addresses?
I have even seen some SMTP servers that do not allow sending e-mail to anyone
except within domain. Some universities have this policy. i.e. they allow
sending e-mail only to people within university (or even only within
department).
Try sending e-mail where both "To" and "From" is the same address and is within
domain and valid, i.e. FROM: kar...@softhome.net ... TO: kar...@softhome.net ...
Double number1 = 36893488147419103231;
Double number2 = 2305843009213693951;
to check whether these numbers are primes. But I get
java:7: integer number too large: 2305843009213693951
So there is no way to represent these numbers in java?
Java ints only store numbers from -2147483648 to 2147483647.
Because the compiler always assumes int unless told otherwise, it
will choke on large numbers.
The next step up from ints, longs, store numbers from
-9223372036854775808 to 9223372036854775807. To specify that a
number is of type long, append an L (lower-case works too). e.g.
long number2 = 2305843009213693951L;
Now, if you only want to store approximations of the numbers
(probably not for prime determination), double and float are also
usable. To tell the compiler that a number is a double just
include a decimal point. e.g. double number1 =
36893488147419103231.0; The float type is less precise, and is
specified by including a decimal point and an F (lower-case works
too). e.g. float number2 = 36893488147419103231.0f;
The upper-case types (Double, Integer, Long, etc) are actually
classes rather than primitive types (double, int, long, etc). Be
careful mixing the two, as they are _really_ not the same thing.
Cheers,
Chris
Yes, there is. But is it a mistake, that you typed Double with a capital D?
If you want the class Double to contain this number, you do the following:
Double number1 = new Double(36893488147419103231.0);
Remember the .0 to indicate that it is a double value.
If you really meant this to be a primitive type double, you do the
following:
double number1 = 36893488147419103231.0
Again .0 to indicate a double value.
If nothing else is indicated the compiler assumes that the constant
initializer value is an int. Therefore:
double number1 = 36893488147419103231;
will cause an "integer number too large" error.