How to set up SMTP service on local machine.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   huiming_Gu
Posted On:   Tuesday, August 28, 2001 02:08 PM

I need to write one servlet only to send email. According the requirement. I need to set SMTP service on the machine. I did this because I can successfully send email using ASP CDONT object(Microsoft's object for send email). Which means the SMTP on the machine works fine. I also successed in send email using my yahoo account(SMTP.mail.yahoo.com, they need userid and password), which means that I write the java program correct. But when I try to sending email only use my local machine. I got the following error: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 at javax.mail.Transport.sen   More>>

I need to write one servlet only to send email. According the requirement. I need to set SMTP service on the machine.


I did this because I can successfully send email using ASP CDONT object(Microsoft's object for send email). Which means the SMTP on the machine works fine. I also successed in send email using my yahoo account(SMTP.mail.yahoo.com, they need userid and password), which means that I write the java program correct. But when I try to sending email only use my local machine. I got the following error:



			
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at SMTPClient$1.run(SMTPClient.java:93)
at java.lang.Thread.run(Thread.java:484)
Any one can help me solve this problem. Can you explain, what SMTP software you installed. What OS you are using. How you configged the SMTP service? Thanks a lot~~~~~~~~~~~~~~~~~    <<Less

Re: How to set up SMTP service on local machine.

Posted By:   John_Zukowski  
Posted On:   Wednesday, August 29, 2001 10:33 AM

The stack trace says that there is no SMTP service on the web server that is running your servlet. I'd guess that your SMTP server is on another machine. Set the machine name in your program to whatever your SMTP server is.
About | Sitemap | Contact