tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AC <s...@lisea.com>
Subject Re: 100$ + free dinner in Italy for whom answers this one
Date Thu, 18 Jan 2001 12:18:18 GMT
         //
         Properties props = System.getProperties();

         props.put("mail.smtp.host", getMailSMTPServer());

         // Get a Session object
         javax.mail.Session mailSession = 
javax.mail.Session.getDefaultInstance(props, null);

where getMailSMTPServer() method is something like
         if (this.getServletContext().getInitParameter("mailSMTPServer") != 
null)
                 return 
this.getServletContext().getInitParameter("mailSMTPServer");
         else
                 return ""; //default smt server!!!

  and mailSMTPServer is a properties in web.xml file o fyour webapp.

andrea

At 11.06 18/01/2001 +0100, you wrote:
>Hello Vittorio!!!!!!!!!
>
>Why do you want to set SMTP server properties in the javamail package????
>Isn't more simple to set server properties in the servlet (read it from a
>configuration text file)????
>
>p.s.: di dove sei????
>
>Robuschi Roberto -------------------- Delfi srl
>P.za Ravenet 1/b - 43100 PARMA
>Tel. 0521/932474 Fax 0521/989045
>r.robuschi@delfi.it --- http://www.delfi.it
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message