You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ben Speakmon <bs...@apache.org> on 2007/09/14 01:25:04 UTC
Re: Commons email error with localhost server ?
Hi Nicolas,
When you call setHostName(), are you using "localhost" or 127.0.0.1 or some
other name? This error happens when a server is expecting a valid hostname
as part of its HELO command and doesn't get one.
On 9/13/07, Nicolas BOIRE <nb...@free.fr> wrote:
>
> Hello,
>
> I have an error when i tried to send a email with localhost server.
> I have a postfix server mail on localhost and when i try to send a email
> in command line (telnet localhost 25 ....), it's ok .
>
> I use the commons-email-1.0.jar in tomcat 5.0
>
> The stacktrace :
> Caused by: javax.mail.MessagingException: 501 Syntax: HELO hostname
>
> at
> com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1308)
> at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:785)
> at
> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:327)
> at javax.mail.Service.connect(Service.java:236)
> at javax.mail.Service.connect(Service.java:137)
> at javax.mail.Service.connect(Service.java:86)
> at javax.mail.Transport.send0(Transport.java:150)
> at javax.mail.Transport.send(Transport.java:80)
> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:863)
> ... 47 more
>
>
> Thanks for your help .
> Best regards,
>
> Nicolas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
Re: Commons email error with localhost server ?
Posted by Ben Speakmon <bs...@apache.org>.
De rien :)
On 9/14/07, Nicolas BOIRE <nb...@free.fr> wrote:
>
> Ben Speakmon a écrit :
> > Hi Nicolas,
> >
> > When you call setHostName(), are you using "localhost" or 127.0.0.1 or
> some
> > other name? This error happens when a server is expecting a valid
> hostname
> > as part of its HELO command and doesn't get one.
> >
>
> > Ok it's works. The server name isn't declare in my /etc/hosts
> Thanks you for your help
>
> Regards,
> > On 9/13/07, Nicolas BOIRE <nb...@free.fr> wrote:
> >
> >> Hello,
> >>
> >> I have an error when i tried to send a email with localhost server.
> >> I have a postfix server mail on localhost and when i try to send a
> email
> >> in command line (telnet localhost 25 ....), it's ok .
> >>
> >> I use the commons-email-1.0.jar in tomcat 5.0
> >>
> >> The stacktrace :
> >> Caused by: javax.mail.MessagingException: 501 Syntax: HELO hostname
> >>
> >> at
> >> com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1308)
> >> at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:785)
> >> at
> >> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:327)
> >> at javax.mail.Service.connect(Service.java:236)
> >> at javax.mail.Service.connect(Service.java:137)
> >> at javax.mail.Service.connect(Service.java:86)
> >> at javax.mail.Transport.send0(Transport.java:150)
> >> at javax.mail.Transport.send(Transport.java:80)
> >> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:863)
> >> ... 47 more
> >>
> >>
> >> Thanks for your help .
> >> Best regards,
> >>
> >> Nicolas
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: user-help@commons.apache.org
> >>
> >>
> >>
> >
> >
>
>
Re: Commons email error with localhost server ?
Posted by Nicolas BOIRE <nb...@free.fr>.
Ben Speakmon a écrit :
> Hi Nicolas,
>
> When you call setHostName(), are you using "localhost" or 127.0.0.1 or some
> other name? This error happens when a server is expecting a valid hostname
> as part of its HELO command and doesn't get one.
>
> Ok it's works. The server name isn't declare in my /etc/hosts
Thanks you for your help
Regards,
> On 9/13/07, Nicolas BOIRE <nb...@free.fr> wrote:
>
>> Hello,
>>
>> I have an error when i tried to send a email with localhost server.
>> I have a postfix server mail on localhost and when i try to send a email
>> in command line (telnet localhost 25 ....), it's ok .
>>
>> I use the commons-email-1.0.jar in tomcat 5.0
>>
>> The stacktrace :
>> Caused by: javax.mail.MessagingException: 501 Syntax: HELO hostname
>>
>> at
>> com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1308)
>> at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:785)
>> at
>> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:327)
>> at javax.mail.Service.connect(Service.java:236)
>> at javax.mail.Service.connect(Service.java:137)
>> at javax.mail.Service.connect(Service.java:86)
>> at javax.mail.Transport.send0(Transport.java:150)
>> at javax.mail.Transport.send(Transport.java:80)
>> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:863)
>> ... 47 more
>>
>>
>> Thanks for your help .
>> Best regards,
>>
>> Nicolas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>
>