This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am new to this Forum and to Java as well.. Let me know how to go about learning java. I am looking to make programs and gradually learn by executing practical examples.
I am also reading SCJP book for reference.
I want to make a java program which sends email. I've got the following code
// File Name SendEmail.java
I have a XAMPP host working. and I have attached the Jars for the JAF and the JavaMail. What else do I need to configure. I am unsure how to go about setting the SMTP. Though I have enabled it on my windows 7 laptop. But still getting the error.
Cannot open and load mail server properties file.
Cannot send email. javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
Thanks in advance.
Continues effort by me and little help from the experts will help me grow..
Tim Moores wrote:Neither IIS nor Telnet have anything to do with mail.
Not completely true. IIS is not just the web server, it also includes an FTP and SMTP server. However, they aren't started automatically. You would need to configure and start the SMTP server part of IIS. Or go for Apache James of course.
Tim Moores wrote:Neither IIS nor Telnet have anything to do with mail. You need something like Apache James.
Hi I am using apache Xampp. This includes Mercury mail server.
Still I am getting this error. How do i Check whether the mail server is working or not.
I did
telnet google.com 25
which says that its unable to connect..
Anubhav Aeron
Greenhorn
Joined: Feb 25, 2012
Posts: 4
posted
0
Rob Spoor wrote:
Tim Moores wrote:Neither IIS nor Telnet have anything to do with mail.
Not completely true. IIS is not just the web server, it also includes an FTP and SMTP server. However, they aren't started automatically. You would need to configure and start the SMTP server part of IIS. Or go for Apache James of course.
Hi,
I have started the SMTP server from the control panel already. But I am still getting the same error..