Unknown SMTP host

Help
Santos Jha
2008-09-04
2013-04-25
  • Santos Jha

    Santos Jha - 2008-09-04

    Hello,

    I was able to deploy the war file on tomcat5.5.25 that is running on window vista under java 1.5. To my surprise it started to get mail form gmail using both pop and imap.

    However when I try to send mail I get "Unknown SMTP host". I changed the smtp host but no avail.

    Any hints will be highly appreciated.

    Thank you.
    Santos

     
    • Stephan Sann

      Stephan Sann - 2008-09-04

      What exact hostname did you use? Sounds like a DNS-problem.

      Did you select the SSL- or TLS-option (AFAIR gmail doesn't support SMTP without SSL or TLS).
      Port for SSL-option: 465
      Port for TLS-option: 587

      HTH
      Stephan

       
      • Santos Jha

        Santos Jha - 2008-09-04

        I guess I know the issue:
        if I put yawebmail.war downloaded for sourceforge and change smtp.properties, I am able to send mail.

        However, If I download the source code and compile it. It has the issue that I  wrote before.

        I downloaded using eclipse subversion plugin on August 24 using following URL

        https://yawebmail.svn.sourceforge.net/svnroot/yawebmail/yawebmail_faces/trunk

        Please let me know.
        Thank you.
        Santos

         
        • Stephan Sann

          Stephan Sann - 2008-09-04

          Compile-problems may have a lot of causes. The best way to build the WAR-file from the sources it to use Maven.

          Change to the project-folder on the command-line. Than try:

          mvn clean package

          The result should be a WAR-File identical to the one you can download from sourceforge (unless Maven finds any problem with the build).

          Good luck!
          Stephan

           
          • Santos Jha

            Santos Jha - 2008-09-04

            Thank you Stephan,

            I did as you said. I get following compilation results ( below), which is a successful compilation. However once I deploy still I get basically same error:

            Javax.mail.MessagingException

            Unknown SMTP host: smtp.gmail.com   

            com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1389)
            com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
            javax.mail.Service.connect(Service.java:310)
            javax.mail.Service.connect(Service.java:169)
            javax.mail.Service.connect(Service.java:118)
            javax.mail.Transport.send0(Transport.java:188)
            javax.mail.Transport.send(Transport.java:118)
            de.lotk.yawebmail.controller.CreateMailController.sendMail(CreateMailController.java:363)
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

            ......More

            -----------------------------------Compilations-----------------------------------------
            C:\javaprojects\yawebmail_faces>mvn clean package
            [INFO] Scanning for projects...
            [INFO] ------------------------------------------------------------------------
            [INFO] Building yet another webmail
            [INFO]    task-segment: [clean, package]
            [INFO] ------------------------------------------------------------------------
            [INFO] [clean:clean]
            [INFO] Deleting directory C:\javaprojects\yawebmail_faces\target
            [INFO] [resources:resources]
            [INFO] Using default encoding to copy filtered resources.
            Downloading: http://download.java.net/maven/2/org/gnu/inet/libidn/0.6.7/libidn-
            Downloading: http://download.java.net/maven/1/org.gnu.inet/poms/libidn-0.6.7.po
            Downloading: http://repo1.maven.org/maven2/org/gnu/inet/libidn/0.6.7/libidn-0.6
            Downloading: http://download.java.net/maven/2/myfaces/myfaces-api/1.1.5/myfaces
            Downloading: http://download.java.net/maven/1/myfaces/poms/myfaces-api-1.1.5.po
            Downloading: http://repo1.maven.org/maven2/myfaces/myfaces-api/1.1.5/myfaces-ap
            Downloading: http://download.java.net/maven/2/myfaces/myfaces-impl/1.1.5/myface
            Downloading: http://download.java.net/maven/1/myfaces/poms/myfaces-impl-1.1.5.p
            Downloading: http://repo1.maven.org/maven2/myfaces/myfaces-impl/1.1.5/myfaces-i
            Downloading: http://download.java.net/maven/2/myfaces/tomahawk/1.1.6/tomahawk-1
            Downloading: http://download.java.net/maven/1/myfaces/poms/tomahawk-1.1.6.pom
            Downloading: http://repo1.maven.org/maven2/myfaces/tomahawk/1.1.6/tomahawk-1.1.
            [INFO] [compiler:compile]
            [INFO] Compiling 75 source files to C:\javaprojects\yawebmail_faces\target\clas
            [INFO] [resources:testResources]
            [INFO] Using default encoding to copy filtered resources.
            [INFO] [compiler:testCompile]
            [INFO] Compiling 2 source files to C:\javaprojects\yawebmail_faces\target\test-
            [INFO] [surefire:test]
            [INFO] Surefire report directory: C:\javaprojects\yawebmail_faces\target\surefi

            -------------------------------------------------------
            T E S T S
            -------------------------------------------------------
            Running de.lotk.yawebmail.application.TestYawebmailVersion
            Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.041 sec
            Running de.lotk.yawebmail.controller.TestLogonController
            Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.049 sec

            Results :

            Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

            [INFO] [war:war]
            [INFO] Packaging webapp
            [INFO] Assembling webapp[yawebmail] in [C:\javaprojects\yawebmail_faces\target\ [INFO] Processing war project
            [INFO] Webapp assembled in[1314 msecs]
            [INFO] Building war: C:\javaprojects\yawebmail_faces\target\yawebmail-1.2.0.war
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD SUCCESSFUL
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 17 seconds
            [INFO] Finished at: Thu Sep 04 11:13:54 EDT 2008
            [INFO] Final Memory: 16M/254M
            [INFO] ------------------------------------------------------------------------

             
          • Santos Jha

            Santos Jha - 2008-09-04

            BTW I am using smtp.google.com and port 587 with TLS checked while sending mail

             
          • Santos Jha

            Santos Jha - 2008-09-04

            Well another amazing news. I downloaded tar ball and tried to compile it. It works. Thus I guess if I download using eclipse subeclipe plugin somthing wierd happens.

             

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks