tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynir Hübner <rey...@hugsmidjan.is>
Subject RE: Sending Email
Date Wed, 07 Nov 2001 17:24:17 GMT

The localhost value is comes from server.xml  (unless you are not using
the jndi resource configured in server.xml)
Did you restart tomcat when you changed server.xml ?

it should give you could not connect to SMTP host : myisp.net if that
was wrong.
it should also give you other errormessages if it cant send the mail, a
550 or something else.




-----Original Message-----
From: Barry White [mailto:barrywhite@charter.net]
Sent: 7. nóvember 2001 17:27
To: Tomcat Users List
Subject: Re: Sending Email


I do have the correct value in the <value> tag. (myISP.net is just an
example)

The thing I don't understand is why the error message says "Could not
connect to SMTP host: localhost, port: 25".   To me this looks like the
program is assuming that I have an SMTP server running locally on my
box.

Thanks,
Barry

----- Original Message -----
From: "Mika Goeckel" <mika@stepstone.de>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, November 07, 2001 12:00 PM
Subject: Re: Sending Email


> Huh!
>
> You need to change the line
>       <value>mail.myISP.net</value>
> to a smtp server that allows you to connect. If you don't know how to
obtain
> this information, your Outlook->Account->Server settings may give you
an
> answer.
> you don't need to insert user and password into the config file
because
you
> donÄt need them when sending email. They're just necessary for
receiving.
> You may need to set the from header to your email address, because
some
smtp
> servers check not only the IP from which you send but also the sender
> address to avoid spamming.
>
> Cheers, Mika
>
> ----- Original Message -----
> From: "Barry White" <barrywhite@charter.net>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, November 07, 2001 6:00 PM
> Subject: Re: Sending Email
>
>
> > I am trying to use the example Send mail application that came with
Tomcat
> > 4.0 but can't seem to get it to work.
> > I changed the server.xml resouce section to :
> >
> > <ResourceParams name="mail/session">
> >   <parameter>
> >      <name>mail.smtp.host</name>
> >      <value>mail.myISP.net</value>
> >   </parameter>
> > </ResourceParams>
> >
> > But it still gives the following errors:
> >
> > ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
failed;
> > nested exception is: javax.mail.MessagingException: Could not
connect to
> > SMTP host: localhost, port: 25; nested exception is:
> > java.net.ConnectException: Connection refused: connect
> > javax.mail.SendFailedException: Sending failed;
> >   nested exception is:
> >  javax.mail.MessagingException: Could not connect to SMTP host:
localhost,
> > port: 25;
> >   nested exception is:
> >  java.net.ConnectException: Connection refused: connect
> >  at javax.mail.Transport.send0(Transport.java:219)
> >  at javax.mail.Transport.send(Transport.java:81)
> >  at SendMailServlet.doPost(SendMailServlet.java:75) ...........etc
> >
> > I have restarted Tomcat after making the changes to server.xml
> >
> > Also, how do I insert my username and password for my mail into the
> > server.xml file?
> >
> > Thanks,
> > Barry
> >
> > ----- Original Message -----
> > From: "Janek Bogucki" <janekdb@yahoo.co.uk>
> > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > Sent: Tuesday, November 06, 2001 1:36 PM
> > Subject: Re: Sending Email
> >
> >
> > > Hi Bernhard,
> > >
> > > Tomcat 4.0 integrates mail functionality via JNDI.
> > > Have a look at this URL, about 1/3 of the way down
> > > you'll find a section entitled 'JavaMail Sessions'.
> > >
> > >
>
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
l
> > >
> > > "In many web applications, sending electronic mail
> > > messages is a required part of the system's
> > > functionality. The Java Mail API makes this process
> > > relatively straightforward, but requires many
> > > configuration details that the client application must
> > > be aware of (including the name of the SMTP host to be
> > > used for message sending).
> > >
> > > Tomcat 4 includes a standard resource factory that
> > > will create javax.mail.Session session instances for
> > > you, already connected to the SMTP server that is
> > > configured in server.xml. In this way, the application
> > > is totally insulated from changes in the email server
> > > configuration environment - it simply asks for, and
> > > receives, a preconfigured session whenever needed."
> > >
> > >
> > >  --- Bernhard Stoeger <Bernhard@aib.uni-linz.ac.at>
> > > wrote: > Dear user community,
> > > > I have a little problem: I successfully created a
> > > > Web application
> > > > with Tomcat, consisting of some JSP pages that
> > > > communicate
> > > > with a database. Now I want to automatically create
> > > > email
> > > > messages that inform a person about database
> > > > inserts. Now my
> > > > question: Is there a simple way to send a file via
> > > > SMTP from within
> > > > a Java program? I considered taking the JMS package,
> > > > but this
> > > > seems to be a complex matter compared to the simple
> > > > task I want
> > > > to do. Is someone of you aware of a simple SMTP
> > > > client written in
> > > > Java? Another possibility would be to call a Win32
> > > > SMTP client
> > > > from within my Java program. Does some of you know a
> > > > method to
> > > > start shell applications from within Java?
> > > >
> > > > Thank you very much in advance for your help,
> > > >
> > > > with best regards,
> > > >
> > > > Bernhard Stoeger
> > > >
> > > >
> > > >
> > > > Educational Endeavor "Computer Science for the
> > > > Blind",
> > > > University of Linz, Department for Computer Science,
> > > > Altenbergerstrasse 69, 4040 Linz, Austria.
> > > > Bernhard Stoeger               Tel.:
> > > > +43/732/2468/9608, Fax: -/9322,
> > > > email: bernhard@mvblind.uni-linz.ac.at
> > > >     "I can't see my computer, my computer doesn't
> > > > watch me, but
> > > >      together we conquer the world." (not
> > > > Shakespeare!)
> > > >
> > > > --
> > > > To unsubscribe:
> > > > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > > For additional commands:
> > > > <mailto:tomcat-user-help@jakarta.apache.org>
> > > > Troubles with the list:
> > > > <mailto:tomcat-user-owner@jakarta.apache.org>
> > > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Everything you'll ever need on one web page from News and Sport to
Email
> > and Music Charts
> > > http://uk.my.yahoo.com
> > >
> > > --
> > > To unsubscribe:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands:
<mailto:tomcat-user-help@jakarta.apache.org>
> > > Troubles with the list:
<mailto:tomcat-user-owner@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands:
<mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list:
<mailto:tomcat-user-owner@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message