The program of JavaMail to send email by using gmail SMTP server was working correctly in Windows 7. When I tested the program in Windows XP in a different machine, then the email is not going. Either Messaging or SendMail exception comes. I have used JDK1.6 and NetBeans 5.5 in both the machines.
Kindly let me know whether the problem is because of change of OS (in which case some changes in coding may be needed) or some setting needs to be done in NetBeans, which was taken automatically in Windows 7.
Also, please see ItDoesntWorkIsUseless: what's actually happening? Are the same ports open on both machines? Are the machine's firewall/etc. settings the same?
Joined: May 20, 2010
I'm getting MessagingException and SendFailedException. How to check for the opened ports in Windows? In Windows XP, I have disabled firewall but its enabled with few settings in Windows 7. In spite of the fact that firewall is enabled in Win 7, there are no issues with the program. On the contrary, disabling the firewall in Windows XP didn't solve my problem.
I think the issue is with the ports only. Can you please help me in finding out the closed ports in Win? For gmail smtp server (since I'm sending and receiving messages in gmail only through my application), what should be the port number to be checked?
Yes, I've already gone through that text but the code which I wrote is already working in one machine with Win 7. So, I think the issue should not be with the code only.
That, Sir, is a very dangerous assumption. Just because some code works in one environment doesn't mean the code is correct. If you close yourself off to possibilities which other, possibly more experienced developers are pointing out to you, you run the risk of never solving your problem.