On Fri, 26 Mar 2004, Arora, Avinash wrote:

> Hi,
>    I am using mailer1.1. yes the documentation indicates that run time
> expression is not allowed. So is there any solution or I always have to
> hardcode the email address in to and from field.

Instead of specifying the addresses as attributes of the <mail> tag, you
can specify them with the <setrecipient> tag, where you can use the body
of the tag for the address, like this:

  <mt:mail ... >
    <mt:setrecipient type="to">
      <%=c.getDnsRecieverEmail()%>
    </mt:setrecipient>
    <mt:setrecipient type="cc">
      <%=c.getDnsSenderEmail()%>
    </mt:setrecipient>
  </mt:mail>

--
Martin Cooper


>
> Avinash Arora
>
>
> -----Original Message-----
> From: Marc Guillemot [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 26, 2004 2:17 AM
> To: [EMAIL PROTECTED]
> Subject: Re: mailer taglib
>
> What version are you using?
> Is it possible that the tld indicates that runtime expressions are not
> allowed?
>
> Marc.
>
> Arora, Avinash wrote:
> > Hi,
> >    I am trying to use the mailer1.1 taglibs to send email. If I
> hardcode
> > the values of to and from field, the email can be send. But when I use
> a
> > java class to print the value inside to: the mail can not be send. I
> > have checked the value obtained by java class by printing it out. It
> is
> > correct value.
> > Below is the code that I am using with mail tags.
> >
> >
> > <mt:mail server="1.1.1.1" to="<%=c.getDnsRecieverEmail()%>"
> > from="<%=c.getDnsSenderEmail()%>" subject="test mail.">
> >     <mt:message>Congrats u got the mail.</mt:message>
> >     <mt:send/>
> >    </mt:mail>
> > Please let me know what is wrong with the to: and from: in this case.
> > Also how can I rectify this problem.
> > Thanks.
> >
> >
> >
> >
> >
> >
> >
> > Avinash Arora
> >
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to