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>[EMAIL PROTECTED]</mail:from>
<mail:to>[EMAIL PROTECTED]</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: [EMAIL PROTECTED]
Office: (212) 485-3492
Mobile: (917) 613-0508
*******************
MLB.com Where Baseball is always on.
http://www.mlb.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]