You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Sun, Chris" <Ch...@mlb.com> on 2004/05/11 18:45:15 UTC
HTML SendMail Help
Hello,
I am having problems sending HTML email through the sendmail/mail tags
provided by cocoon in XSP. I can send HTML email using the body tag and
cocoon utility tag but not through the src/srcMimeType tags. I am trying to
execute the XSP via the command line interface.
Any help is greatly appreciated.
My XSP looks like the following:
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:mail="http://apache.org/cocoon/sendmail/1.0"
xmlns:util="http://apache.org/xsp/util/2.0"
>
<page>
<content>
<mail:send-mail>
<mail:from>baseball@mlb.com</mail:from>
<mail:to>chris.sun@mlb.com</mail:to>
<mail:subject>This is a test</mail:subject>
<mail:smtphost>10.2.6.68</mail:smtphost>
<!-- THIS WORKS, IT SENT ME WWW.YAHOO.COM IN AN EMAIL -->
<mail:body><xsp:expr>
<util:get-source uri="http://www.yahoo.com"/>
</xsp:expr></mail:body>
-->
<!-- THIS DOES NOT WORK -->
<mail:src>http://www.yahoo.com</mail:src>
<mail:srcMimeType>text/html</mail:srcMimeType>
<mail:on-success>
<p>
Email successfully sent.
</p>
</mail:on-success>
<mail:on-error>
<p style="color:red;">
An error occurred: <mail:error-message/>
</p>
</mail:on-error>
</mail:send-mail>
</content>
</page>
</xsp:page>
The error I receive is the following:
An error occurred: Sending failed;
nested exception is:
class javax.mail.MessagingException: IOException while sending
message;
nested exception is:
java.io.IOException: No content
___________________________
Christopher Sun
MLB Advanced Media
E-Mail: chris.sun@mlb.com
Office: (212) 485-3492
Mobile: (917) 613-0508
*******************
MLB.com Where Baseball is always on.
http://www.mlb.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: HTML SendMail Help
Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Sun, Chris wrote:
> Hello,
>
> I am having problems sending HTML email through the sendmail/mail tags
> provided by cocoon in XSP. I can send HTML email using the body tag and
> cocoon utility tag but not through the src/srcMimeType tags. I am trying to
> execute the XSP via the command line interface.
>
> Any help is greatly appreciated.
>
> My XSP looks like the following:
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:mail="http://apache.org/cocoon/sendmail/1.0"
> xmlns:util="http://apache.org/xsp/util/2.0"
>
> <page>
> <content>
> <mail:send-mail>
> <mail:from>baseball@mlb.com</mail:from>
> <mail:to>chris.sun@mlb.com</mail:to>
> <mail:subject>This is a test</mail:subject>
> <mail:smtphost>10.2.6.68</mail:smtphost>
> <!-- THIS WORKS, IT SENT ME WWW.YAHOO.COM IN AN EMAIL -->
> <mail:body><xsp:expr>
> <util:get-source uri="http://www.yahoo.com"/>
> </xsp:expr></mail:body>
> -->
> <!-- THIS DOES NOT WORK -->
> <mail:src>http://www.yahoo.com</mail:src>
> <mail:srcMimeType>text/html</mail:srcMimeType>
> <mail:on-success>
> <p>
> Email successfully sent.
> </p>
> </mail:on-success>
> <mail:on-error>
> <p style="color:red;">
> An error occurred: <mail:error-message/>
> </p>
> </mail:on-error>
> </mail:send-mail>
> </content>
> </page>
> </xsp:page>
>
> The error I receive is the following:
>
> An error occurred: Sending failed;
> nested exception is:
> class javax.mail.MessagingException: IOException while sending
> message;
> nested exception is:
> java.io.IOException: No content
There has been a bug when using the src way to add a message body. Please upgrade
to latest CVS version and report back.
Chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org