Topic
  • 6 replies
  • Latest Post - ‏2009-02-26T01:24:07Z by SystemAdmin
SystemAdmin
SystemAdmin
1660 Posts

Pinned topic Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

‏2006-05-26T18:46:18Z |
Hi,

I have some code in my web app that sends email. I use my own machine (localhost) as the SMTP server. When I run the application under tomcat 5.0.28 and JDK 1.4.2_11, the code works and the email is sent.

When I run under Websphere Community Edition v1 with the same JDK as tomcat, on the same machine, using the same SMTP host and emailing to the same addresses, I get this:

org.springframework.mail.MailSendException: Could not send mails: 555 5.5.4 Notifier parameter unrecognized

javax.mail.MessagingException: 555 5.5.4 Notifier parameter unrecognized

at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1020)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:716)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:388)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:291)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:277)
trace goes into my code here

This is odd--it seems to indicate that the SMTP server is behaving differently based on which application server is being used. Probably my code is sending slightly different commands to the smtp server depending on which app server is used.
Could it be that websphere is somewhere using a different version of the javax.mail or com.sun.mail classes even though I package mail.jar in my WAR file in WEB-INF/lib to ensure that it's the same in tomcat and websphere?

Hope someone has some insight here.

Thanks
Updated on 2009-02-26T01:24:07Z at 2009-02-26T01:24:07Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2006-06-30T22:56:59Z  
    I am also facing the similar error. The email code works fine for Jrun web server. But the same code does NOT work for tomcat server.
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2006-07-12T03:23:05Z  
    I have the same problem,i send email use tomcat5.5 and jdk1.5,my app work well on windows system,but when i take them to linux , it can not work
    the out is :
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Providerhttp://TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "220.194.58.223", port 25, isSSL false
    220 mail.ugogo.cn ESMTP Postfix
    DEBUG SMTP: connected to host "220.194.58.223", port: 25

    EHLO
    501 Syntax: EHLO hostname
    HELO
    501 Syntax: HELO hostname
    javax.mail.MessagingException: 501 Syntax: HELO hostname

    at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1363)
    at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:838)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:375)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)
    at com.cgogo.spupload.util.MyMail.sendTextMail(MyMail.java:278)
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2006-07-12T13:25:43Z  
    I have the same problem,i send email use tomcat5.5 and jdk1.5,my app work well on windows system,but when i take them to linux , it can not work
    the out is :
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Providerhttp://TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "220.194.58.223", port 25, isSSL false
    220 mail.ugogo.cn ESMTP Postfix
    DEBUG SMTP: connected to host "220.194.58.223", port: 25

    EHLO
    501 Syntax: EHLO hostname
    HELO
    501 Syntax: HELO hostname
    javax.mail.MessagingException: 501 Syntax: HELO hostname

    at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1363)
    at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:838)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:375)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)
    at com.cgogo.spupload.util.MyMail.sendTextMail(MyMail.java:278)
    501 Syntax: HELO hostname
    Unfortunately, this means that your email program or the mail server which passed the message on to ours has a bug. While talking to our mail server, it should introduce itself by saying HELO name. However it didn't give a name.
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2009-02-25T22:53:32Z  
    Try this http://forums-beta.sun.com/thread.jspa?messageID=2252508 (I haven't tried it yet so could not be the solution however I'm unlikely to come back to post it if it works ok). I am using tomcat 5.x, postfix latest and diablojdk 1.5 on top of freebsd 7.0 (yes i know some are a little bit outdated but those ones won't be deployed) (all same localhost) therefore the problem doesn't seems to be related to anything of that. Actually everything was working ok until I needed to simulate better the deployment server and changed the computer domain name to the actual domain. What we share in common seems to be the javamail implementation and not putting that property. Maybe Sun engineers should throw an exception when not set the property or throw a clearer message to developers or sysadmins in the exception that is thrown because current one is very cryptic.

    Regards Everyone
    Waldo
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2009-02-26T01:17:13Z  
    Try this http://forums-beta.sun.com/thread.jspa?messageID=2252508 (I haven't tried it yet so could not be the solution however I'm unlikely to come back to post it if it works ok). I am using tomcat 5.x, postfix latest and diablojdk 1.5 on top of freebsd 7.0 (yes i know some are a little bit outdated but those ones won't be deployed) (all same localhost) therefore the problem doesn't seems to be related to anything of that. Actually everything was working ok until I needed to simulate better the deployment server and changed the computer domain name to the actual domain. What we share in common seems to be the javamail implementation and not putting that property. Maybe Sun engineers should throw an exception when not set the property or throw a clearer message to developers or sysadmins in the exception that is thrown because current one is very cryptic.

    Regards Everyone
    Waldo
    Thore reading this thread are in luck (the original poster published it 3 years earlier). I left the page open and it turned to be the solution:

    props.put("mail.smtp.localhost", smtpServerName);

    fixes the problem if you are doing things programatically. Let's see how do I load a .properties to not not need to recompile if that configuration changes in the future.
  • SystemAdmin
    SystemAdmin
    1660 Posts

    Re: Mail sending code works in tomcat, fails in websphere: 555 5.5.4 Notifier parameter unrecognized

    ‏2009-02-26T01:24:07Z  
    Try this http://forums-beta.sun.com/thread.jspa?messageID=2252508 (I haven't tried it yet so could not be the solution however I'm unlikely to come back to post it if it works ok). I am using tomcat 5.x, postfix latest and diablojdk 1.5 on top of freebsd 7.0 (yes i know some are a little bit outdated but those ones won't be deployed) (all same localhost) therefore the problem doesn't seems to be related to anything of that. Actually everything was working ok until I needed to simulate better the deployment server and changed the computer domain name to the actual domain. What we share in common seems to be the javamail implementation and not putting that property. Maybe Sun engineers should throw an exception when not set the property or throw a clearer message to developers or sysadmins in the exception that is thrown because current one is very cryptic.

    Regards Everyone
    Waldo
    Those reading this thread are in luck (the original poster published it 3 years earlier). I left the page open and it turned to be the solution for javax.mail.MessagingException: 501 Syntax: HELO hostname:

    props.put("mail.smtp.localhost", smtpServerName);

    fixes the problem if you are doing things programatically. Let's see how do I load a .properties to not need to recompile if that configuration changes in the future.