| Linode Forum https://forum.linode.com/ |
|
| javax.mail.MessagingException: Could not connect to SMTP https://forum.linode.com/viewtopic.php?f=11&t=9172 |
Page 1 of 1 |
| Author: | keithphw [ Sat Jul 21, 2012 10:24 am ] |
| Post subject: | javax.mail.MessagingException: Could not connect to SMTP |
Hi, I've got a linode running with apache tomcat/catalina serving web pages on its own. The tomcat web application works well, but I can't configure it to send emails. I think it's because I am using the wrong mail host name, since tomcat gives the following exceptions: Code: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; My context.xml file's Context tag contains the following: Code: <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="mail.plato" /> In the example here (http://tomcat.apache.org/tomcat-7.0-doc ... l_Sessions) they use "localhost" which is what i did too. I've also tried "mail.localhost", and since my computer's name is "plato", I've tried "plato" and "mail.plato". But all give me the same exception. I read this javax.mail-related thread but I think it's an unrelated problem : viewtopic.php?p=26863 Any tips would be appreciated. I'm pretty sure that I'm just messing up the name of my mail server, so rather than localhost it's something else but I don't know what. Thanks a lot, Keith |
|
| Author: | glg [ Sat Jul 21, 2012 10:45 am ] |
| Post subject: | Re: javax.mail.MessagingException: Could not connect to SMTP |
do you have a mail server (exim, postfix, etc) installed? |
|
| Author: | keithphw [ Sat Jul 21, 2012 6:55 pm ] |
| Post subject: | Re: javax.mail.MessagingException: Could not connect to SMTP |
Thank you glg, you're right, I do not have a mail server. I thought that the javax.mail API did the mail server function but it doesn't. I'll work on getting Apache James (http://james.apache.org/) or postfix working. Thanks a lot! Keith |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|