You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by jr...@psu.edu on 2003/04/29 01:36:07 UTC

Jakarta MailTag fails to authenticate with James

Hello,

I have james 2.1.2 on WindowsXP Pro.  The SMTP Server is configured to
require authentication.

I'm trying to use Apache Jakarta's Mailer TagLibrary (with Tomcat
4.1.18) to send emails from my JSP-based application (Ref:
http://jakarta.apache.org/taglibs/doc/mailer-doc/intro.html).  Cognizant
that I have to authenticate, I provide user/pass information as the
mailer docs require.

When I test my form, the mail tag picks up no errors.  In my tomcat log
files, I see "2003-04-28 18:55:31 Could not send the e-mail sent to
postmaster@johnruiz.com:  smtp".

Somewhere between the tag library and James, things around going wrong.
My first (newbie) question is: how do I find out who is responsible for
the problem, the tag library or James?  If it is the tag library, it's
not your problem.  But if it is James, then the followup question is:
what changes need to be made to James such that the Mailer TagLibrary
will work using authentication?

Here is the JSP code snippet I'm using to try and send the email.

--- BEGIN SNIPPET ---
<%@ taglib prefix="mt"
uri="http://jakarta.apache.org/taglibs/mailer-1.1" %>
<%@ taglib prefix="log" uri="http://jakarta.apache.org/taglibs/log-1.0"
%>

<log:info category="join.jsp?action=request">
  Will now send email to <c:out value="${param.em}" />.
</log:info>
<mt:mail authenticate="true" user="webmaster" password="something">
  <mt:setrecipient type="to">
    <c:out value="${param.em}" />
  </mt:setrecipient>
  <mt:addrecipient type="bcc">
    webmaster@johnruiz.com
  </mt:addrecipient>
  <mt:from>
    webmaster@johnruiz.com
  </mt:from>
  <mt:subject>
    JohnRuiz.com Account Confirmation
  </mt:subject>
  <mt:message>
      [Message snipped]
  </mt:message>
  <mt:send>
    <log:error category="join.jsp?action=request" 
         message="Couldn't send an email - nested exception follows." />
    <mt:error id="err">
      <log:error category="join.jsp?action=request">
        <jsp:getProperty name="err" property="error"/>
      </log:error>
    </mt:error> 
  </mt:send>
</mt:mail>
--- END SNIPPET ---


If this turns out *not* to be a problem with James, then I apologize for
posting this as it would then be off-topic - I just don't know if such
is the case or not, yet. :)

Thanks,
John Ruiz

--------------------------------------
Senior @ Pennsylvania State University
Vice President, IST Student Government
http://www.johnruiz.com/  AIM: ipandra
Phone: 814.272.4324 Cell: 814.883.7013



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: Jakarta MailTag fails to authenticate with James

Posted by "Noel J. Bergman" <no...@devtech.com>.
> how do I find out who is responsible for the problem,
> the tag library or James?

Go into SAR-INF/environment.xml and turn on DEBUG for the SMTP server.  Then
you can check the log to see the SMTP transaction.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org