Getting error 421

Hi All,

I am using a code sample for sending mail using javamail. It works fine if i call the class from a jsp page. But i have called the class using TimerTask (schedule to run once every day at midnight). The class TimerTask calls 2 different class for sending different types of mails accordingly. The call to first class sends the mail properly, but the second class gives an error saying "not able to connect to mail server port 21 response 421". Also the call to the first class sends 2-3 copies of mails instead of one.

Let me know what would be the issue over here.

Thanks in advance,

Naresh

[630 byte] By [NareshIndiaa] at [2007-11-27 4:53:34]
# 1
The issue would be your code is wrong. Have you tried to debug it?I don't know where the "not able to connect" message is coming from.If you're really trying to connect on port 21 that's part of your problem.Port 21 is the FTP port.
bshannona at 2007-7-12 10:08:01 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...