You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by kidong <Ki...@public.uni-hamburg.de> on 2001/04/05 14:45:25 UTC

problem with sending email

hello,

I have demonstrated sending email with turbine with following code:

...

public void doSendEmail(RunData data, Context context)
        throws Exception, javax.mail.MessagingException
{


       HtmlEmail html_email = new HtmlEmail();

       html_email.setFrom("kle@silverscreen.de", "kidong");
       html_email.addTo("s1484378@rzbt.fh-hamburg.de", "icarus");
       html_email.setSubject("this is a test");
       html_email.setHtmlMsg("<p><h2>hello, icarus</h2></p>");
       html_email.send();

}

...

But it failed, does anybody have idea about how to send email?

thanks,
kidong


Re: problem with sending email

Posted by Skondras Panagiotis <pa...@acn.gr>.
Here it's a way
Criteria crit = new Criteria();
        crit.add ( Email.SENDER_EMAIL, "xxx" );
        crit.add ( Email.SENDER_NAME, "xxx" );
        crit.add ( Email.RECEIVER_EMAIL, "xxx" );
        //crit.add ( Email.RECEIVER_EMAIL, "xx" );
        crit.add ( Email.RECEIVER_NAME, "xxx" );
        crit.add ( Email.EMAIL_SUBJECT, "xxx" );
        crit.add ( Email.EMAIL_BODY, "xxx" );

        SimpleEmail se = new SimpleEmail(crit);
        se.send();


kidong wrote:

> hello,
>
> I have demonstrated sending email with turbine with following code:
>
> ...
>
> public void doSendEmail(RunData data, Context context)
>         throws Exception, javax.mail.MessagingException
> {
>
>        HtmlEmail html_email = new HtmlEmail();
>
>        html_email.setFrom("kle@silverscreen.de", "kidong");
>        html_email.addTo("s1484378@rzbt.fh-hamburg.de", "icarus");
>        html_email.setSubject("this is a test");
>        html_email.setHtmlMsg("<p><h2>hello, icarus</h2></p>");
>        html_email.send();
>
> }
>
> ...
>
> But it failed, does anybody have idea about how to send email?
>
> thanks,
> kidong


Re: problem with sending email

Posted by Rafal Krzewski <Ra...@e-point.pl>.
kidong wrote:

> I have demonstrated sending email with turbine with following code:

Uh, this is Velocity list, not Turbine's ...

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:Rafal.Krzewski@e-point.pl
+48 22 8534830 http://e-point.pl