Saturday, April 18, 2009

Messaging Exception In Java Mail

If you are getting an exception as below.
Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host:
: port
The main reason behind this is the antivirus software(MCafee) which is blocking your port
you need to do the following to make your mail functionality work properly

This is the steps for McAfee
1. go to VirusScan Console
2. Double click Access Protection,in Access Protection tab you have to choose Anti-Virus Standard Protection Category
3. uncheck the Block of "Prevent mass mailing worms from sending mail".

Now you run your application its will works fine

No comments: