Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending E-Mails fails

0 views
Skip to first unread message

Philipp Sumi

unread,
Apr 24, 2002, 5:38:23 AM4/24/02
to
Hello

I don't know why but sending e-mails through the javax.mail-package fails.
It's strange that sending mails to local recipients works fine (according to
the error message below):

server: mail.foo.com
recipient: x...@foo.com works fine
recipient x...@xyz.com doesn't work...

Error Message
***********

2002-04-21 16:46:22,126 ERROR [HttpProcessor[8080][4]]
ee.core.utils.CoreLogger -
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 not local host freesurf.ch, not a
gateway

at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at
com.datenreich.j2ee.core.utils.MailComponent.send(MailComponent.java:296)

It can't be the problem of my mail server because I'm using the same server
to send mails through normal e-mail clients. Any suggestions?

Thank you very much

Philipp

Jon Skeet

unread,
Apr 24, 2002, 6:30:28 AM4/24/02
to
Philipp Sumi <nospa...@freesurf.ch> wrote:
> It can't be the problem of my mail server because I'm using the same server
> to send mails through normal e-mail clients. Any suggestions?

That doesn't mean it's not a problem with talking to the mail server.

o Are you on the same machine as the normal e-mail clients? Many mail
servers will only relay from local machines, IIRC

o The mail server may only allow outgoing mail if you've recently logged
in for incoming mail. I've certainly seen that before now.

--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too

Joe

unread,
Apr 24, 2002, 9:10:15 AM4/24/02
to
Jon Skeet scratched out

> Philipp Sumi <nospa...@freesurf.ch> wrote:
> > It can't be the problem of my mail server because I'm using the same server
> > to send mails through normal e-mail clients. Any suggestions?
>
> That doesn't mean it's not a problem with talking to the mail server.
>
> o Are you on the same machine as the normal e-mail clients? Many mail
> servers will only relay from local machines, IIRC
>
> o The mail server may only allow outgoing mail if you've recently logged
> in for incoming mail. I've certainly seen that before now.
>
>
Jon is correct the "not a gateway" error you are getting usually means
you have to log into your mail server first before sending. You can't use
the static send method of transport.
--
Joe

"I bent my wookie" - Ralph Wiggum

Philipp Sumi

unread,
Apr 24, 2002, 3:37:08 PM4/24/02
to
Hello Jon and Joe

Thanks for the immediate reply. As it's also not working if running on the
server, I'll contact my ISP first (I think it sould be allowed for the
server itself...).

Thanks for your advice :-)

Philipp

"Joe" <yoha...@nospam.space.com> schrieb im Newsbeitrag
news:MPG.173078c42...@news.bellglobal.com...

Joe

unread,
Apr 24, 2002, 4:39:03 PM4/24/02
to
Philipp Sumi scratched out

> Thanks for the immediate reply. As it's also not working if running on the
> server, I'll contact my ISP first (I think it sould be allowed for the
> server itself...).
>
does your email account require you to login ? if so you have to
authenticate first before sending the email.

transport = session.getTransport();
transport.connect( mail.host, username, password );

Philipp Sumi

unread,
Apr 25, 2002, 6:03:27 AM4/25/02
to
Hello Joe

Thanks for your advice. The problem was that the server didn't look where
the email came from but who the sender was (regarding the email-address). It
failed because I didn't explicitely set the senders address but generated
one (feedback...@www.foo.com). The problem was the "www." as the
server accepts just emails coming from any...@foo.com.

Thanks for your suggestions :-)

Philipp


"Joe" <yoha...@nospam.space.com> schrieb im Newsbeitrag

news:MPG.1730e1f6a...@news.bellglobal.com...

0 new messages