unable to send a java mail
iam trying to send a simple email using javamailAPI but iam getting the following error sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts. at sun.net.smtp.SmtpClient.issueCommand(Unknown Source) at sun.net.smtp.SmtpClient.toCanonical(Unknown Source) Iam trying for last 4 days ,but i couldn't solve this problem it is important ,bcos iam using it in my project i'll be grateful to someone who solves this problem thanks
RE: unable to send a java mail
The problem appears to be with your SMTP server and not java. Looks like you might need to open it up a bit to relaying. Ta Matt -Original Message- From: vishwam [mailto:[EMAIL PROTECTED] Sent: 28 April 2005 14:18 To: Tomcat Users List Subject: unable to send a java mail iam trying to send a simple email using javamailAPI but iam getting the following error sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts. at sun.net.smtp.SmtpClient.issueCommand(Unknown Source) at sun.net.smtp.SmtpClient.toCanonical(Unknown Source) Iam trying for last 4 days ,but i couldn't solve this problem it is important ,bcos iam using it in my project i'll be grateful to someone who solves this problem thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unable to send a java mail
From: vishwam [mailto:[EMAIL PROTECTED] iam trying to send a simple email using javamailAPI but iam getting the following error sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts. That's a response from your mail server. I suspect you're trying to send it something like: RCPT [EMAIL PROTECTED] ... where it's not allowed to accept mail for somedomain.com, probably because the server's configured to stop it being used as a relay. If you know who you're sending to, try this from the Tomcat server: telnet mailserver 25 [and then type into the telnet window] HELO name of Tomcat server MAIL From:from address RCPT To:recipient address ... and see whether you get a 553 error back from the RCPT. That would prove it. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to send a java mail
Hi, try to make a POP3 request before trying to send a SMTP Mail thru the mailserver. This can be a security feature of your mailserver. Marco --- http://www.kontaktlinsen-preisvergleich.de http://www.parfuem-faq.de Am Donnerstag, den 28.04.2005, 18:48 +0530 schrieb vishwam: iam trying to send a simple email using javamailAPI but iam getting the following error sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts. at sun.net.smtp.SmtpClient.issueCommand(Unknown Source) at sun.net.smtp.SmtpClient.toCanonical(Unknown Source) Iam trying for last 4 days ,but i couldn't solve this problem it is important ,bcos iam using it in my project i'll be grateful to someone who solves this problem thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to send a java mail
my smtp server requires authentication with username password but i couldn't find these smtp authentication fields in java mail specification my email program is like this public class MailServlet extends HttpServlet { static final String FROM = [EMAIL PROTECTED]; static final String TO = [EMAIL PROTECTED]; public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/plain); PrintWriter out = res.getWriter(); ParameterParser parser = new ParameterParser(req); String from = parser.getStringParameter(from, FROM); String to = parser.getStringParameter(to, TO); try { SmtpClient smtp = new SmtpClient(xx); // smtphost name smtp.from(from); smtp.to(to); PrintStream msg = smtp.startMessage(); msg.println(To: + to); // so mailers will display the To: address msg.println(Subject: Customer feedback); msg.println(); Enumeration enum1 = req.getParameterNames(); while (enum1.hasMoreElements()) { String name = (String)enum1.nextElement(); if (name.equals(to) || name.equals(from)) continue; // Skip to/from String value = parser.getStringParameter(name, null); msg.println(name + = + value); } msg.println(); msg.println(---); msg.println(Sent by + HttpUtils.getRequestURL(req)); smtp.closeServer(); } - Original Message - From: Dale, Matt [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, April 28, 2005 6:49 PM Subject: RE: unable to send a java mail The problem appears to be with your SMTP server and not java. Looks like you might need to open it up a bit to relaying. Ta Matt -Original Message- From: vishwam [mailto:[EMAIL PROTECTED] Sent: 28 April 2005 14:18 To: Tomcat Users List Subject: unable to send a java mail iam trying to send a simple email using javamailAPI but iam getting the following error sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts. at sun.net.smtp.SmtpClient.issueCommand(Unknown Source) at sun.net.smtp.SmtpClient.toCanonical(Unknown Source) Iam trying for last 4 days ,but i couldn't solve this problem it is important ,bcos iam using it in my project i'll be grateful to someone who solves this problem thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unable to send a java mail
From: vishwam [mailto:[EMAIL PROTECTED] my smtp server requires authentication with username password but i couldn't find these smtp authentication fields in java mail specification The section entitled 'transport' in http://java.sun.com/developer/onlineTraining/JavaMail/contents.html gives more information - essentially, use Transport.send (message, username, password) to send the message. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Tomcat5.0.25 and Java Mail not seem to work]
Hi all, I am currently porting an application from Tomcat 4.1.x to Tomcat 5.0.25. Everything is going fine except for JavaMail. In the application we have setup both database and JavaMail as Global Naming Resources. The database global work fine but I am getting the following with the Mail resource (see output below) I have downloaded the 2 mail and activation Jars and added them to the tomcat_home/common/lib directory (have also tried in the endorsed directory) * javamail-1.3.1 * jaf-1.0.2 (activation) I have also tried to setup the java mail in the individual contexts with the same error is this a bug or am I doing something wrong?!!! Thanks in advance, Alex. From the catalina.out: 13/06/2004 03:37:50 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 13/06/2004 03:37:50 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 969 ms 13/06/2004 03:37:50 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans SEVERE: Exception processing Global JNDI Resources javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2291) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) 13/06/2004 03:37:50 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 13/06/2004 03:37:50 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.25 13/06/2004 03:37:50 org.apache.catalina.core.StandardHost start INFO: XML validation disabled Server.xml snippet: GlobalNamingResources ... more stuff ... Resource name=mail/Session_global auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session_global parameternamemail.smtp.host/namevaluemail.internode.on.net/value/parameter /ResourceParams Resource name=jdbc/Database_global auth=Container type=javax.sql.DataSource description=pool of JDBC/ ResourceParams name=jdbc/Database_global parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/value/parameter /ResourceParams /GlobalNamingResources ... more stuff ... Host name=www.developer.ourhost.com debug=1 appBase=webapps unpackWARs=true Context path= docBase=our-app-base debug=1 privileged=true reloadable=true override=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=www.developer.ourhost.com_access_log. suffix=.txt pattern=combined / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=www.developer.ourhost.com. suffix=.txt timestamp=true / ResourceLink name=jdbc/Database global=jdbc/Database_global type=javax.sql.DataSource / ResourceLink name=mail/Session global=mail/Session_global type=javax.mail.Session / /Context /Host
Re: [Fwd: Tomcat5.0.25 and Java Mail not seem to work]
Maybe because of this? http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29255 Grab 5.0.26beta. Jake At 01:45 PM 6/13/2004 +1000, you wrote: Hi all, I am currently porting an application from Tomcat 4.1.x to Tomcat 5.0.25. Everything is going fine except for JavaMail. In the application we have setup both database and JavaMail as Global Naming Resources. The database global work fine but I am getting the following with the Mail resource (see output below) I have downloaded the 2 mail and activation Jars and added them to the tomcat_home/common/lib directory (have also tried in the endorsed directory) * javamail-1.3.1 * jaf-1.0.2 (activation) I have also tried to setup the java mail in the individual contexts with the same error is this a bug or am I doing something wrong?!!! Thanks in advance, Alex. From the catalina.out: 13/06/2004 03:37:50 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 13/06/2004 03:37:50 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 969 ms 13/06/2004 03:37:50 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans SEVERE: Exception processing Global JNDI Resources javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2291) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) 13/06/2004 03:37:50 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 13/06/2004 03:37:50 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.25 13/06/2004 03:37:50 org.apache.catalina.core.StandardHost start INFO: XML validation disabled Server.xml snippet: GlobalNamingResources ... more stuff ... Resource name=mail/Session_global auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session_global parameternamemail.smtp.host/namevaluemail.internode.on.net/value/parameter /ResourceParams Resource name=jdbc/Database_global auth=Container type=javax.sql.DataSource description=pool of JDBC/ ResourceParams name=jdbc/Database_global parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/value/parameter /ResourceParams /GlobalNamingResources ... more stuff ... Host name=www.developer.ourhost.com debug=1 appBase=webapps unpackWARs=true Context path= docBase=our-app-base debug=1 privileged=true reloadable=true override=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=www.developer.ourhost.com_access_log. suffix=.txt pattern=combined / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=www.developer.ourhost.com. suffix=.txt timestamp=true / ResourceLink name=jdbc/Database global=jdbc/Database_global type=javax.sql.DataSource / ResourceLink name=mail/Session global=mail/Session_global type=javax.mail.Session
Re: [Fwd: Tomcat5.0.25 and Java Mail not seem to work]
Thanks Jake. Found same post just before and did exactly that. Solved my problem. Jacob Kjome wrote: Maybe because of this? http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29255 Grab 5.0.26beta. Jake At 01:45 PM 6/13/2004 +1000, you wrote: Hi all, I am currently porting an application from Tomcat 4.1.x to Tomcat 5.0.25. Everything is going fine except for JavaMail. In the application we have setup both database and JavaMail as Global Naming Resources. The database global work fine but I am getting the following with the Mail resource (see output below) I have downloaded the 2 mail and activation Jars and added them to the tomcat_home/common/lib directory (have also tried in the endorsed directory) * javamail-1.3.1 * jaf-1.0.2 (activation) I have also tried to setup the java mail in the individual contexts with the same error is this a bug or am I doing something wrong?!!! Thanks in advance, Alex. From the catalina.out: 13/06/2004 03:37:50 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 13/06/2004 03:37:50 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 969 ms 13/06/2004 03:37:50 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans SEVERE: Exception processing Global JNDI Resources javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2291) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) 13/06/2004 03:37:50 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 13/06/2004 03:37:50 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.25 13/06/2004 03:37:50 org.apache.catalina.core.StandardHost start INFO: XML validation disabled Server.xml snippet: GlobalNamingResources ... more stuff ... Resource name=mail/Session_global auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session_global parameternamemail.smtp.host/namevaluemail.internode.on.net/value/parameter /ResourceParams Resource name=jdbc/Database_global auth=Container type=javax.sql.DataSource description=pool of JDBC/ ResourceParams name=jdbc/Database_global parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/value/parameter /ResourceParams /GlobalNamingResources ... more stuff ... Host name=www.developer.ourhost.com debug=1 appBase=webapps unpackWARs=true Context path= docBase=our-app-base debug=1 privileged=true reloadable=true override=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=www.developer.ourhost.com_access_log. suffix=.txt pattern=combined / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=www.developer.ourhost.com. suffix=.txt timestamp=true / ResourceLink name=jdbc/Database global=jdbc/Database_global
TC5 java mail woes
Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 java mail woes
It was the crack.. I had an old mail jar kicking around in my ext directory.. I killed it works fine.. No mail jar required in the webapps lib directory.. Just common/lib with activation.jar mark On 23 Apr 2004, at 17:42, Mark Lowe wrote: Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC5 java mail woes
javax.activation in both by webapp lib directory and common/lib don't put the same class file in two different locations to be loaded by two different classloaders. remove it from webapp/lib and keep it only in common/lib, and try again filip -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:42 AM To: Tomcat Users List Subject: TC5 java mail woes Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 java mail woes
Yeah .. sure thanks.. On 23 Apr 2004, at 21:24, Filip Hanik ((lists)) wrote: javax.activation in both by webapp lib directory and common/lib don't put the same class file in two different locations to be loaded by two different classloaders. remove it from webapp/lib and keep it only in common/lib, and try again filip -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:42 AM To: Tomcat Users List Subject: TC5 java mail woes Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Mail from a servlet
Guys I had this webapp completely functioning on another server. Not I am getting this odd error from my mail serlvet Steve Gums [EMAIL PROTECTED]
Java Mail Real Email
Sorry about that last one. fingers are faster then the brain.. anyways like I was saying.. This servlet was mailing fine before. Not I get the following Unable to complete :javax.mail.NoSuchProviderException: No provider for Address type: rfc822 Here is the web.xml segment resource-ref description Resource reference to a factory for javax.mail.Session which maybe used to send e-mail messages. Preconfigured to talk to webmail.voast.com /description res-ref-namemail/VKeySession/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref The relevant context.xml excerpt Resource name=mail/VKeySession auth=Container type=javax.mail.Session / ResourceParams name=mail/VKeySession parameter namemail.smtp.host/name valuewebmail.voast.com/value /parameter /ResourceParams Did I miss some setup step somewhere? Steve Gums [EMAIL PROTECTED]
Re: Java Mail Real Email
: Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
Mail.jar and activation.jar but I will check again Steve -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 8:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Mail Real Email
http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
Thanks much -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:14 AM To: Tomcat Users List Subject: Re: Java Mail Real Email http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
That did it. Just needed a newer mail.jar and activation.jar Thanks for the help Adrian! -Original Message- From: Steve Gums [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:16 AM To: 'Tomcat Users List' Subject: RE: Java Mail Real Email Thanks much -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:14 AM To: Tomcat Users List Subject: Re: Java Mail Real Email http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Mail Real Email
my pleasure although Dave Liles did the actual helping. :-) Adrian - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 12:34 PM Subject: RE: Java Mail Real Email That did it. Just needed a newer mail.jar and activation.jar Thanks for the help Adrian! -Original Message- From: Steve Gums [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:16 AM To: 'Tomcat Users List' Subject: RE: Java Mail Real Email Thanks much -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:14 AM To: Tomcat Users List Subject: Re: Java Mail Real Email http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
Sorry Thanks Dave -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:26 AM To: Tomcat Users List Subject: Re: Java Mail Real Email my pleasure although Dave Liles did the actual helping. :-) Adrian - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 12:34 PM Subject: RE: Java Mail Real Email That did it. Just needed a newer mail.jar and activation.jar Thanks for the help Adrian! -Original Message- From: Steve Gums [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:16 AM To: 'Tomcat Users List' Subject: RE: Java Mail Real Email Thanks much -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:14 AM To: Tomcat Users List Subject: Re: Java Mail Real Email http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail Real Email
No problem glad to be of help. -Original Message- From: Steve Gums [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 12:21 PM To: 'Tomcat Users List' Subject: RE: Java Mail Real Email Sorry Thanks Dave -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:26 AM To: Tomcat Users List Subject: Re: Java Mail Real Email my pleasure although Dave Liles did the actual helping. :-) Adrian - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 12:34 PM Subject: RE: Java Mail Real Email That did it. Just needed a newer mail.jar and activation.jar Thanks for the help Adrian! -Original Message- From: Steve Gums [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:16 AM To: 'Tomcat Users List' Subject: RE: Java Mail Real Email Thanks much -Original Message- From: Adrian Lanning [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:14 AM To: Tomcat Users List Subject: Re: Java Mail Real Email http://java.sun.com/products/javamail/ javamail-1_3_1.zip - Filesize = 2,270,566 bytes. You'll need activation.jar too. There's a link to it on the above page. Adrian Lanning - Original Message - From: Steve Gums [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:53 AM Subject: RE: Java Mail Real Email Is there a good place to get these jars without pulling the whole dang SDK. -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:27 AM To: Tomcat Users List Subject: RE: Java Mail Real Email I got a similar error when I migrated a working web app from one server to another. The problem resulted from an older version of the mail.jar on the server I moved the web app too. You might want to compare the mail.jar files between the two servers. -Dave -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:56 AM To: Tomcat Users List Subject: Re: Java Mail Real Email : Unable to complete :javax.mail.NoSuchProviderException: No provider for : Address type: rfc822 The phrase completely functioning on another server is the tipoff -- what's in the working server's {tomcat inst}/common/lib? Anything JavaMail related? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to change default SMTP port 25 in java mail?
hi all, i am using java mail in my webapp. my client does'nt want to use default SMTP port 25. i have to use port specified by client. the project is on tomcat-4.1.29. can some one give me sample code to do this? Thanks Bopanna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change default SMTP port 25 in java mail?
Bopanna, 1. This is not related to Tomcat. Please try a JavaMail list next time. 2. RTFM: http://java.sun.com/products/javamail/javadocs/overview-summary.html Search the page for port. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change default SMTP port 25 in java mail?
This is not off topic for the tomcat user list Chris. How would one do this in tomcats configuration? By adding an environmental variable to resource configuration in the server.xml file of tomcat. A proper subject for the tomcat user list indeed. See the configuration doc for tomcat if you have further questions on configuring the javamail resource in tomcat's server.xml http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html here's an example, the reference that Chris provides details all the parameters you can set for the Mail Session via this method. Context ... ... Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter parameter namemail.smtp.port/name value25/value /parameter /ResourceParams ... /Context Cheers, Mark Christopher Schultz wrote: Bopanna, 1. This is not related to Tomcat. Please try a JavaMail list next time. 2. RTFM: http://java.sun.com/products/javamail/javadocs/overview-summary.html Search the page for port. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mark Diggory Software Developer Harvard MIT Data Center http://osprey.hmdc.harvard.edu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Mail Question
Java will only contact the SMTP server when you call Transport.send(). - Original Message - From: Peter Vertes [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, September 12, 2003 10:46 PM Subject: Java Mail Question Hello All, Quick question about Tomcat and Java Mail. When I create a JNDI mail resource will it act like a Connection Pool ? Meaning, will there always be a session logged into the specified SMTP server or will Tomcat only log into the SMTP server once I explicitly ask for a session ? Thanks in advance... -Pete -- perl -e 'print pack(H*, 70766572746573406E79632E72722E636F6D0A)' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Mail Question
Hello All, Quick question about Tomcat and Java Mail. When I create a JNDI mail resource will it act like a Connection Pool ? Meaning, will there always be a session logged into the specified SMTP server or will Tomcat only log into the SMTP server once I explicitly ask for a session ? Thanks in advance... -Pete -- perl -e 'print pack(H*, 70766572746573406E79632E72722E636F6D0A)'
Re: Java mail
You need to execute the below code before sending message to setup System authentication Properties props = System.getProperties(); if ( authenticationRequired) --- like if useriD.length != 0 props.put(mail.smtp.auth, true); else props.put(mail.smtp.auth, false); -Dan - Original Message - From: Paul Hsu [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: huikuo hsu [EMAIL PROTECTED] Sent: Saturday, March 08, 2003 9:29 PM Subject: Java mail Hi, I try to develope a java mail. I have a problem about how to authenticate email sender against email server. Since the email server ask for authentication if you want to send a email through that server because of spam issue. I got javax.mail.MessagingException==553 Authentication is required to send mail as [EMAIL PROTECTED] error every time. The following is my Mailer class. I wonder if any one know what is wrong with my code. Any help will be appreciated. package com.smartequip.email; import javax.mail.*; import javax.mail.internet.*; import javax.activation.FileDataSource; import javax.activation.DataHandler; import java.util.*; import java.io.*; import com.smartequip.common.AppBase; public class Mailer extends AppBase { public static String TEXTPLAIN = 1; public static String TEXTHTML = 2; public static String EDI = 3; private String smtpHost=null; private String subject=null; private String from=null; private Vector toV = new Vector(); private Vector ccV = new Vector(); private Vector attachedV = new Vector(); private String textMessage=null; private String message_type = 1; private String userName=; private String password=; private Auth auth; private Session session; public Mailer() { } public Mailer(String smtpHost) { this.smtpHost = smtpHost; } public void setUserName(String s) { this.userName = s; } public void setPassword(String s) { this.password = s; } public void setSmtpHost(String smtpHost) { this.smtpHost = smtpHost; } public void setFrom(String from) { this.from = from; } public void addTo(String to) { toV.add(to); } public void addCc(String cc) { ccV.add(cc); } public void setSubject(String subject) { this.subject = subject; } public void addAttached(String attached) { attachedV.add(attached); } public void setTextMessage(String message) { this.textMessage = message; } public void setMessageType(String t) { this.message_type = t; } public void send() throws Exception { Message msg = prepareHeader(); if(message_type.equals(TEXTPLAIN)) msg.setContent(textMessage, text/plain); if(message_type.equals(TEXTHTML)) msg.setContent(textMessage, text/html); sendMesg(msg); } private void sendMesg(Message msg) throws Exception { msg.saveChanges(); // implicit with send() Transport transport = session.getTransport(smtp); transport.connect(smtpHost, userName, password); transport.sendMessage(msg, msg.getAllRecipients()); transport.close(); } private Message prepareHeader() throws Exception { Properties props = new Properties(); if(smtpHost == null) throw new Exception(No SMTP Host specified.); props.put(mail.smtp.host, smtpHost); props.put(mail.user, userName); props.put(password, password); session = Session.getDefaultInstance(props, null); session.setDebug(true); Message msg = new MimeMessage(session); // set from if(from == null) throw new Exception(No Sender specified.); InternetAddress addr = new InternetAddress(from); msg.setFrom(addr); // set to if(toV.size() == 0) throw new Exception(No Recipients specified.); for (int i = 0; i toV.size(); i++) { InternetAddress addrt = new InternetAddress((String)toV.get(i)); msg.addRecipient(Message.RecipientType.TO, addrt); } // set cc for (int i = 0; i ccV.size(); i++) { InternetAddress addrt = new InternetAddress((String)ccV.get(i)); msg.addRecipient(Message.RecipientType.CC, addrt); } // set subject if(subject == null) throw new Exception(No Subject specified.); msg.setSubject(subject); msg.setSentDate(new Date()); return msg; } } // Mailer thanks Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java mail
Hi, I try to develope a java mail. I have a problem about how to authenticate email sender against email server. Since the email server ask for authentication if you want to send a email through that server because of spam issue. I got javax.mail.MessagingException==553 Authentication is required to send mail as [EMAIL PROTECTED] error every time. The following is my Mailer class. I wonder if any one know what is wrong with my code. Any help will be appreciated. package com.smartequip.email; import javax.mail.*; import javax.mail.internet.*; import javax.activation.FileDataSource; import javax.activation.DataHandler; import java.util.*; import java.io.*; import com.smartequip.common.AppBase; public class Mailer extends AppBase { public static String TEXTPLAIN = 1; public static String TEXTHTML = 2; public static String EDI = 3; private String smtpHost=null; private String subject=null; private String from=null; private Vector toV = new Vector(); private Vector ccV = new Vector(); private Vector attachedV = new Vector(); private String textMessage=null; private String message_type = 1; private String userName=; private String password=; private Auth auth; private Session session; public Mailer() { } public Mailer(String smtpHost) { this.smtpHost = smtpHost; } public void setUserName(String s) { this.userName = s; } public void setPassword(String s) { this.password = s; } public void setSmtpHost(String smtpHost) { this.smtpHost = smtpHost; } public void setFrom(String from) { this.from = from; } public void addTo(String to) { toV.add(to); } public void addCc(String cc) { ccV.add(cc); } public void setSubject(String subject) { this.subject = subject; } public void addAttached(String attached) { attachedV.add(attached); } public void setTextMessage(String message) { this.textMessage = message; } public void setMessageType(String t) { this.message_type = t; } public void send() throws Exception { Message msg = prepareHeader(); if(message_type.equals(TEXTPLAIN)) msg.setContent(textMessage, text/plain); if(message_type.equals(TEXTHTML)) msg.setContent(textMessage, text/html); sendMesg(msg); } private void sendMesg(Message msg) throws Exception { msg.saveChanges(); // implicit with send() Transport transport = session.getTransport(smtp); transport.connect(smtpHost, userName, password); transport.sendMessage(msg, msg.getAllRecipients()); transport.close(); } private Message prepareHeader() throws Exception { Properties props = new Properties(); if(smtpHost == null) throw new Exception(No SMTP Host specified.); props.put(mail.smtp.host, smtpHost); props.put(mail.user, userName); props.put(password, password); session = Session.getDefaultInstance(props, null); session.setDebug(true); Message msg = new MimeMessage(session); // set from if(from == null) throw new Exception(No Sender specified.); InternetAddress addr = new InternetAddress(from); msg.setFrom(addr); // set to if(toV.size() == 0) throw new Exception(No Recipients specified.); for (int i = 0; i toV.size(); i++) { InternetAddress addrt = new InternetAddress((String)toV.get(i)); msg.addRecipient(Message.RecipientType.TO, addrt); } // set cc for (int i = 0; i ccV.size(); i++) { InternetAddress addrt = new InternetAddress((String)ccV.get(i)); msg.addRecipient(Message.RecipientType.CC, addrt); } // set subject if(subject == null) throw new Exception(No Subject specified.); msg.setSubject(subject); msg.setSentDate(new Date()); return msg; } } // Mailer thanks Paul
RE: Newbie: Java Mail Problem
David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11
RE: Newbie: Java Mail Problem
On that note, if you're using Windows 2000 and XP Professional, you can simply install a SMTP service on your computer. It's part of IIS, though, which means you'll have to install that if you haven't already. If you want to see if you have it installed, goto Start-Control Panel-Administrative Tools. If you have it installed, you should see a shortcut there that says Internet Information Services. Open that up, and you can configure both IIS and any of it's related services, including SMTP. If you don't have it installed, and want to install it, goto Start-Control Panel-Add or Remove Programs and click on Add/Remove Windows Components. You'll be shown a list of things that you can install, one of which is IIS. Might be overkill, though, and if you do install it or have it running, you want to make EXTRA sure your computer isn't visible to the outside world on port 25. You can configure the SMTP service to deny connections from anything but localhost, for example. John -Original Message- From: Burden, Parker To: Tomcat Users List Sent: 12/30/02 8:56 AM Subject: RE: Newbie: Java Mail Problem David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180 ) at org.apache.catalina.core.StandardPipeline
Re: Newbie: Java Mail Problem
Parker, Hi. What a surprise to get a reply from someone I actually know. I solved the problem, but I forgot to notify the list. It turned out that Tomcat wasn't actually shut down and restarted properly. Now, it works fine. Have a happy New Year! David Burden, Parker wrote: David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service
Re: Newbie: Java Mail Problem
I resolved the problem. It turns out that I had not really stopped and restarted the Tomcat service after reconfiguring server.xml, even though I thought I had. Now, it works fine. Thanks everyone! David Burden, Parker wrote: David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11
Newbie: Java Mail Problem
I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:536)
Re: Newbie: Java Mail Problem
David, u might call or label yourself a Newbie, but you got me beat on being able to connect Tomcat to the Apache Server!! How the hell do you do it?!! Incidentally, I have the version 4.1.16 of tomcat, and the version 2.04* of the Apache HTTP server FYI! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Java Mail Problem
In/localhost:8080/examples/jsp/mail/sendmail.txt it notes that the assumption is that no user authentication is required. Is it reasonable to assume that verizon.net will expect user authentication? -- titleExample Mail Sending Form/title /head body bgcolor=white pThis page will send an electronic mail message via the codejavax.mail.Session/code resource factory that is configured into the JNDI context for this web application. Before it can be used successfully, you must take note of the following:/p ul liThe default configuration assumes that there is an SMTP server running on stronglocalhost/strong. If this is not the case, edit your codeconf/server.xml/code file and change the value for the codemail.smtp.host/code parameter to the name of a host that provides SMTP service for your network./li liThe application logic assumes that no user authentication is required by your SMTP server before accepting mail messages to be sent./li At 04:32 PM 12/28/2002 -0500, you wrote: I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Java Mail Problem
From the error, looks like it's still trying to connect to an smtp server at localhost. Did you restart Tomcat after changing mail.smtp.host? dwh David Diskin wrote: I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Java Mail Problem
yes, I stopped and restarted the Tomcat service. Denis Haskin wrote: From the error, looks like it's still trying to connect to an smtp server at localhost. Did you restart Tomcat after changing mail.smtp.host? dwh David Diskin wrote: I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Java Mail Problem
David, A troubleshooting idea. I'd isolate this problem by ensuring you can communicate directly via javamail. Try a simple test such as this (in a JSP will work fine)... String host = smtp.verizon.net; String from = [EMAIL PROTECTED]; String to = [EMAIL PROTECTED]; // Get system properties Properties props = System.getProperties(); // Setup mail server props.put(mail.smtp.host, host); // Get session Session mailsession = Session.getDefaultInstance(props, null); // Define message MimeMessage message = new MimeMessage(mailsession); // Set the from address message.setFrom(new InternetAddress(from)); // Set the to address message.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); // Set the subject message.setSubject(Test message); // Set the content message.setText(Testing); // Send message Transport.send(message); If this works.. then I'd suspect something in TC or your config. If it doesn't.. you might want to post this info. to the javamail list. Lots of helpful people over there. Good luck, Shawn. yes, I stopped and restarted the Tomcat service. Denis Haskin wrote: From the error, looks like it's still trying to connect to an smtp server at localhost. Did you restart Tomcat after changing mail.smtp.host? dwh David Diskin wrote: I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Java Mail
I am using a virtualserver on server A and cannot send emails. Error : No provider for smtp But the same application on a remote server B using the smtp from server A works fine. If I try to use the activation.jar and mail.jar saved on the WEB-INF/lib directory I get the following error : java.security.AccessControlException: access denied (java.net.SocketPermission serverA.com resolve) Perhaps someone can help. Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Java Mail
Google is your friend ;-) http://list.cobalt.com/pipermail/cobalt-developers/2001-July/032904.html You can find many related solutions with a simple search... Manos Wilhelm Colln wrote: I am using a virtualserver on server A and cannot send emails. Error : No provider for smtp But the same application on a remote server B using the smtp from server A works fine. If I try to use the activation.jar and mail.jar saved on the WEB-INF/lib directory I get the following error : java.security.AccessControlException: access denied (java.net.SocketPermission serverA.com resolve) Perhaps someone can help. Thanks, Wilhelm -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Java Mail
In my experience, the most common cause for mail failures, assuming there is a server available on the correct port, is denial of relays. Make sure your remote server is configured to deliver mail using the FROM and TO addresses that you are using. I would check the sendmail logs on the server, that should give you the exact error message. You could also simply telnet to port 25 on the remote server and type in the sendmail commands and check the responses for problems. John -Original Message- From: Soporte [mailto:soporte;interaccess.com.pe] Sent: Monday, October 21, 2002 7:15 PM To: Tomcat Users List Subject: Re: Java Mail I don't think so because I have POP3 and SMTP via email client (NS or Outlook Express). I can also execute SendMailText.jsp from server A but using the account and smtp from server B. I tried also using IP numbers instead of using names, thinking the server could not resolve the names, but it also didn't work. Wilhelm Shapira, Yoav wrote: Hi, Perhaps you don't have an SMTP server installed on server B? Yoav Shapira Millennium ChemInformatics -Original Message- From: Soporte [mailto:soporte;interaccess.com.pe] Sent: Saturday, October 19, 2002 12:15 PM To: Tomcat Users List Subject: Java Mail If some help could help .. Installations Tomcat 4.0.3 and JDK 1.4 on both servers. I am getting the following error after trying to send a message. It works (SendTextMail.jsp) on server A but not on server B Server B error : No provider for smtp Perhaps this error is very well known ? I can execute SendMailText.jsp on server A using smtp from server B It is the first time that I have problems with the Java Mail API and I am sure it is not the JSP file. Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] - --- This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - --- -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Java Mail
I don't think so because I have POP3 and SMTP via email client (NS or Outlook Express). I can also execute SendMailText.jsp from server A but using the account and smtp from server B. I tried also using IP numbers instead of using names, thinking the server could not resolve the names, but it also didn't work. Wilhelm Shapira, Yoav wrote: Hi, Perhaps you don't have an SMTP server installed on server B? Yoav Shapira Millennium ChemInformatics -Original Message- From: Soporte [mailto:soporte;interaccess.com.pe] Sent: Saturday, October 19, 2002 12:15 PM To: Tomcat Users List Subject: Java Mail If some help could help .. Installations Tomcat 4.0.3 and JDK 1.4 on both servers. I am getting the following error after trying to send a message. It works (SendTextMail.jsp) on server A but not on server B Server B error : No provider for smtp Perhaps this error is very well known ? I can execute SendMailText.jsp on server A using smtp from server B It is the first time that I have problems with the Java Mail API and I am sure it is not the JSP file. Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Tomcat 4,0.3 and Java Mail
I want to know if Tomcat 4.0.3 comes with Java Mail included, or does I need to add the Java Mail API to the lib directory under WEB-INF ? Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Tomcat 4,0.3 and Java Mail
I found that Tomcat 4.0.x includes the Java Mail API within the activation.jar and mail.jar files in the common/lib directory. W Wilhelm Colln wrote: I want to know if Tomcat 4.0.3 comes with Java Mail included, or does I need to add the Java Mail API to the lib directory under WEB-INF ? Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Java Mail
If some help could help .. Installations Tomcat 4.0.3 and JDK 1.4 on both servers. I am getting the following error after trying to send a message. It works (SendTextMail.jsp) on server A but not on server B Server B error : No provider for smtp Perhaps this error is very well known ? I can execute SendMailText.jsp on server A using smtp from server B It is the first time that I have problems with the Java Mail API and I am sure it is not the JSP file. Thanks, Wilhelm -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Java Mail/IMAP
I was looking at SendMailServlet.java example provided by Tomcat 4.0, I was wondering if anyone could provide help using an IMAP server instead. For example, I need to authenticate and am not sure what I need to add in order for that to happen. Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Java Mail/IMAP
On Mon, 15 Jul 2002, Kevin Andryc wrote: Date: Mon, 15 Jul 2002 15:34:43 -0400 From: Kevin Andryc [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Java Mail/IMAP I was looking at SendMailServlet.java example provided by Tomcat 4.0, I was wondering if anyone could provide help using an IMAP server instead. For example, I need to authenticate and am not sure what I need to add in order for that to happen. IMAP only helps you *receive* messages and manage folders. Message sending (via a Transport instance in JavaMail) still requires SMTP. At any rate, the JavaMail download will have docs and examples on how to use the included IMAP support. http://java.sun.com/products/javamail Thanks, Kevin Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Java Mail/IMAP
Hi Kevin, If no one else can help with imap mail in Tomcat, Sun has a mail webapp on their web site that supports IMAP and POP and enclosures of graphics and pdf files, etc. They use a tag library so it's easy to customize. Details are at: http://developer.java.sun.com/developer/technicalArticles/javaserverpages/em ailapps/ Rick - Original Message - From: Kevin Andryc [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, July 15, 2002 3:34 PM Subject: Java Mail/IMAP I was looking at SendMailServlet.java example provided by Tomcat 4.0, I was wondering if anyone could provide help using an IMAP server instead. For example, I need to authenticate and am not sure what I need to add in order for that to happen. Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Java Mail/IMAP
Thanks! I appreciate everyone's help! Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -Original Message- From: Rick Fincher [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 03:53 PM To: Tomcat Users List Subject: Re: Java Mail/IMAP Hi Kevin, If no one else can help with imap mail in Tomcat, Sun has a mail webapp on their web site that supports IMAP and POP and enclosures of graphics and pdf files, etc. They use a tag library so it's easy to customize. Details are at: http://developer.java.sun.com/developer/technicalArticles/javaserverpages/em ailapps/ Rick - Original Message - From: Kevin Andryc [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, July 15, 2002 3:34 PM Subject: Java Mail/IMAP I was looking at SendMailServlet.java example provided by Tomcat 4.0, I was wondering if anyone could provide help using an IMAP server instead. For example, I need to authenticate and am not sure what I need to add in order for that to happen. Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Java Mail problems with Tomcat. Tomcat send mail example not working too.
Hi. I am trying to get JSP example send mail working. And what I did found. I couldn't get parameter mail.smtp.host. I did change this value (in server.xml file), restart server, and nothing changed, example trying to send mail thru localhost. This is code from JSP Send mail example: Context initCtx = new InitialContext(); // here initCtx is empty there are no any parameters. Context envCtx = (Context) initCtx.lookup(java:comp/env); // after this I am getting exception Session session = (Session) envCtx.lookup(mail/Session); Sincerely yours, Ivan Latysh. [EMAIL PROTECTED] http://ivan.yourmail.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Please Help on Java Mail / tomcat
I'm trying to get the content of an e-mail box on a pop3 server. Everything run all right with Jrun but doesn't with Tomcat 3.2 Could somenone explain ??? thanks %@ page import=javax.mail.* % %@ page import=javax.mail.internet.* % %@ page import=java.util.* % %@ page import=java.io.* % HTML HEAD link href=style.css rel=stylesheet type=text/css TITLEBoite aux lettres/TITLE META content=text/html; charset=iso-8859-1 http-equiv=Content-Type /HEAD BODY bgColor=#008080 % String log1=, pwd1=, bl1=, opt1=,dest1=, exp1=,dat1=,suj1=,con1=, chaine=, tempo=; char ch; int fi=0; if (request.getParameter(log)!=null) log1=request.getParameter(log); if (request.getParameter(pwd)!=null) pwd1=request.getParameter(pwd); if (request.getParameter(nb)!=null) bl1=request.getParameter(nb); if (request.getParameter(des)!=null) dest1=request.getParameter(des); if (request.getParameter(exp)!=null) exp1=request.getParameter(exp); if (request.getParameter(opt)!=null) opt1=request.getParameter(opt); if (request.getParameter(dat)!=null) dat1=request.getParameter(dat); if (request.getParameter(suj)!=null) suj1=request.getParameter(suj); if (request.getParameter(con)!=null) con1=request.getParameter(con); % table width=75% cellpadding=0 celspacing=0 % String host = XXX,username = ZZZ/+log1+/+bl1, password = pwd1, provider = pop3; Properties props = new Properties(); Session mailSession = Session.getDefaultInstance(props, null); Store store = mailSession.getStore(provider); store.connect(host, username, password); Folder inbox = store.getFolder(INBOX); if (inbox == null) { out.println(No INBOX); System.exit(1); } inbox.open(Folder.READ_ONLY); Message[] messages = inbox.getMessages(); for (int i = 0; i messages.length; i++) { out.println(TRTD class=txt BRb); out.println(img src=arrow_news.gif border=0nbsp;Message + (i+1)); out.println(/bBR/TD/TRTRTD class=smtxt); if (dest1.equals(on)){ Address[] from = messages[i].getFrom(); if (from != null) { for (int j = 0; j from.length; j++) { out.println(BDe :/b + a href=FormMail.htm + from[j] + /a); out.println(BR); } } } if (dest1.equals(on)){ Address[] to = messages[i].getRecipients(Message.RecipientType.TO); if (to != null) { for (int j = 0; j to.length; j++) { out.println(bA :/b + to[j]); out.println(BR); } } } if (suj1.equals(on)){ String subject = messages[i].getSubject(); if (subject != null) { out.println(BSujet:/b + subject); out.println(BR); } } if (dat1.equals(on)){ Date d = messages[i].getSentDate(); if (d != null) { out.println(bDate:/b + d); out.println(BR); } } out.println(); % /td/trtrtd class=smtxtfont size=-1 % if (con1.equals(on)) { tempo=cnt+String.valueOf(i)+.txt; FileWriter letters = new FileWriter(tempo); Object content = messages[i].getContent(); if (content instanceof String) { chaine=(String)content; out.println(content); for (int j = 0; j chaine.length(); j++) { ch=chaine.charAt(j); letters.write(ch); } } else if (content instanceof InputStream) { InputStream in = (InputStream) content; int c; while ((c = in.read()) != -1) out.write(c); letters.write((char)c); } else { System.out.println(Type de contenu non reconnu); } letters.close(); out.println(BRbR); } % /font % } inbox.close(false); store.close(); % /td/tr/table /BODY HTML
RE: Please Help on Java Mail / tomcat
you're right just below my error page : javax.servlet.ServletException: No provider for pop3 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:459) at mail._0002fmail_0002fpop_0002ejsppop_jsp_17._jspService(_0002fmail_0002f pop_0002ejsppop_jsp_17.java:187) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416 ) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49 8) at java.lang.Thread.run(Thread.java:484) Root cause: javax.mail.NoSuchProviderException: No provider for pop3 at javax.mail.Session.getProvider(Session.java:249) at javax.mail.Session.getStore(Session.java:323) at javax.mail.Session.getStore(Session.java:303) at mail._0002fmail_0002fpop_0002ejsppop_jsp_17._jspService(_0002fmail_0002f pop_0002ejsppop_jsp_17.java:94) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416 ) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49 8) at java.lang.Thread.run(Thread.java:484) -Message d'origine- De : Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 26 avril 2001 13:04 À : '[EMAIL PROTECTED]' Objet : AW: Please Help on Java Mail / tomcat You should provide some more information about the kind of error or symptoms you see. -Ursprüngliche Nachricht- Von: Marot Laurent [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 26. April 2001 12:58 An: [EMAIL PROTECTED] Betreff: Please Help on Java Mail / tomcat I'm trying to get the content of an e-mail box on a pop3 server. Everything run all right with Jrun but doesn't with Tomcat 3.2 Could somenone explain ??? thanks %@ page import=javax.mail.* % %@ page import=javax.mail.internet.* % %@ page import=java.util.* % %@ page import=java.io.* % HTML HEAD link href=style.css rel=stylesheet type=text/css TITLEBoite aux lettres/TITLE META content=text/html; charset=iso-8859-1 http-equiv=Content-Type /HEAD BODY bgColor=#008080 % String log1=, pwd1=, bl1=, opt1=,dest1=, exp1=,dat1=,suj1=,con1=, chaine=, tempo=; char ch; int fi=0; if (request.getParameter(log)!=null) log1=request.getParameter(log); if (request.getParameter(pwd)!=null) pwd1=request.getParameter(pwd); if (request.getParameter(nb)!=null) bl1=request.getParameter(nb); if (request.getParameter(des)!=null) dest1=request.getParameter(des); if (request.getParameter(exp)!=null) exp1=request.getParameter(exp); if (request.getParameter(opt)!=null) opt1=request.getParameter(opt); if (request.getParameter(dat)!=null) dat1=request.getParameter(dat); if (request.getParameter(suj)!=null) suj1=request.getParameter(suj); if (request.getParameter(con)!=null) con1=request.getParameter(con); % table width=75% cellpadding=0 celspacing=0 % String host = XXX,username = ZZZ/+log1+/+bl1, password = pwd1, provider = pop3; Properties props
AW: Please Help on Java Mail / tomcat
It looks like your provider config files are not found at runtime. Excerpt from the JavaMail Spec: The providers for JavaMail APIs are configured using the following files: n javamail.providers and javamail.default.providers n javamail.address.map and javamail.default.address.map Each javamail.X resource file is searched in the following order: 1. java.home/lib/javamail.X 2. META-INF/javamail.X 3. META-INF/javamail.default.X Further readings: JavaMail TM API Design Specification Version 1.2 Chapter 5: The Mail Session. The Provider Registry Maybe you should try to list the valid providers with getProviders(). -Ursprüngliche Nachricht- Von: Marot Laurent [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 26. April 2001 13:08 An: [EMAIL PROTECTED] Betreff: RE: Please Help on Java Mail / tomcat you're right snip/ Root cause: javax.mail.NoSuchProviderException: No provider for pop3 at javax.mail.Session.getProvider(Session.java:249) at javax.mail.Session.getStore(Session.java:323) at javax.mail.Session.getStore(Session.java:303) at snip/