<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>How to use CmsMail?</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<P><FONT size=2><SPAN class=175382910-26092003></SPAN></FONT> </P>
<P><FONT size=2><SPAN class=175382910-26092003>Hello,</SPAN></FONT></P>
<P><FONT size=2><SPAN class=175382910-26092003>Could you please specify the
problem that I've met?</SPAN></FONT></P>
<P><FONT size=2><SPAN class=175382910-26092003>The cms is not null but the
cmsObj is null (after the command: cms.getCmsObject())</SPAN></FONT></P>
<P><FONT color=#0000ff><FONT size=2>com.opencms.flex.jsp.CmsJspActionElement cms
= new </FONT><BR><FONT
size=2>
com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response);</FONT>
<BR></FONT><FONT color=#0000ff size=2>com.opencms.file.CmsObject cmsObj =
cms.getCmsObject();<BR></FONT><FONT size=2><SPAN class=175382910-26092003><FONT
face=Arial color=#0000ff></FONT></SPAN></FONT></P>
<P><FONT size=2><SPAN class=175382910-26092003><FONT face=Arial>Therefore, the
code: </FONT></SPAN></FONT></P>
<P><FONT size=2><FONT color=#0000ff><SPAN
class=175382910-26092003>
</SPAN><SPAN class=175382910-26092003>CmsMail cmsMail = new CmsMail(cmsObj,
"dny@sdcgrp.com", to, "subject", "content",
"text/html");</SPAN></FONT></FONT></P>
<P><FONT size=2><SPAN class=175382910-26092003>will raise an
exception:</SPAN></FONT></P>
<P><FONT color=#ff0000 size=2><SPAN
class=175382910-26092003>java.lang.NullPointerException</SPAN></FONT><FONT
color=#ff0000 size=2><SPAN class=175382910-26092003> at
com.opencms.defaults.CmsMail.<init>(CmsMail.java:404)<BR></SPAN></FONT></P>
<P><FONT size=2><SPAN class=175382910-26092003><FONT face=Arial
color=#0000ff><FONT color=#000000>Before, I used to suceed in creating an
email. Now I get the code back, and it failed. I think the failure maybe
comes from my system, but checked it, I see everything
is alright. Please help me, it's really
urgent.</FONT> </FONT></SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN
class=175382910-26092003></SPAN></FONT> </P>
<P><FONT face=Arial size=2><SPAN
class=175382910-26092003>Thanks,</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN
class=175382910-26092003>Yendung</SPAN></FONT></P></DIV></BODY></HTML>