You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jonas Fernandes <jj...@gmail.com> on 2006/10/04 19:06:15 UTC

Using HtmlEmail to send mail

Hi everybody,

Well, i have a problem to use HtmlEmail.

code :

                HtmlEmail email = new HtmlEmail();

                try
                {

                    email.setHostName("mybuss");
                    email.setFrom("joe@mybuss.com", "Joe");
                    email.addTo("jack@mybuss", "Jack");
                    email.setSubject("Test");
                    email.setHtmlMsg("<b>Hello</b> dude!");
                    email.setAuthentication("joe", "pass123");
                    email.send();


                }
                catch(EmailException ex)
                {
                    System.out.println(ex.toString());
                }


    And when i run this code, the follow exception:

   org.apache.commons.mail.EmailException:
     Sending the email to the following server failed : mybuss:25

     PS.: The user joe and joe´s password are correct. The Hostname too...
This network configuration i use in an ASP Component to send Email too and
work correctly!!!




What´s Wrong???


Atenciosamente
Jonas Fernandes
Equilibrium TI
Desenvolvimento

Re: Using HtmlEmail to send mail

Posted by Jonas Fernandes <jj...@gmail.com>.
Note: Other applications are working normally...

On 10/5/06, Jonas Fernandes <jj...@gmail.com> wrote:
>
> Dion,
> The problem is:
>
> We have a Exchange 2000 Server working here.  This Server requires
> authentication. So, i do all steps that the most examples said... The error
> that show is simply:
> org.apache.commons.mail
> >
> > .EmailException:
> >       Sending the email to the following server failed : mybuss:25
>
>
>
> This code below is exactly the code that i use here (I change the names
> only)...
>  I dont know what can do... I have search in Google some similar problem,
> and dont match... So, if u can help me a little bit...
>
>
>
>
> On 10/4/06, Dion Gillard <di...@gmail.com> wrote:
> >
> > Do you have a longer stack trace for us to help with?
> >
> > On 10/5/06, Jonas Fernandes <jj...@gmail.com> wrote:
> > > ops, error type:
> > >
> > >                     email.setHostName("mybuss");
> > >                     email.setFrom("joe@mybuss.com", "Joe");
> > >                     email.addTo(" jack@mybuss.com", "Jack");
> > //email.addTo("
> > > jack@mybuss", "Jack");
> > >                     email.setSubject("Test");
> > >                     email.setHtmlMsg ("<b>Hello</b> dude!");
> > >                     email.setAuthentication ("joe", "pass123");
> > >                     email.send();
> > >
> > > On 10/4/06, Jonas Fernandes < jjjfernandes@gmail.com> wrote:
> > > >
> > > >
> > > > Hi everybody,
> > > >
> > > > Well, i have a problem to use HtmlEmail.
> > > >
> > > > code :
> > > >
> > > >                 HtmlEmail email = new HtmlEmail();
> > > >
> > > >                 try
> > > >                 {
> > > >
> > > >                     email.setHostName("mybuss");
> > > >                     email.setFrom("joe@mybuss.com", "Joe");
> > > >                     email.addTo(" jack@mybuss", "Jack");
> > > >                     email.setSubject("Test");
> > > >                     email.setHtmlMsg("<b>Hello</b> dude!");
> > > >                     email.setAuthentication ("joe", "pass123");
> > > >                     email.send();
> > > >
> > > >
> > > >                 }
> > > >                 catch(EmailException ex)
> > > >                 {
> > > >                     System.out.println(ex.toString());
> > > >                 }
> > > >
> > > >
> > > >     And when i run this code, the follow exception:
> > > >
> > > >    org.apache.commons.mail.EmailException :
> > > >      Sending the email to the following server failed : mybuss:25
> > > >
> > > >      PS.: The user joe and joe´s password are correct. The Hostname
> > too...
> > > > This network configuration i use in an ASP Component to send Email
> > too and
> > > > work correctly!!!
> > > >
> > > >
> > > >
> > > >
> > > > What´s Wrong???
> > > >
> > > >
> > > > Atenciosamente
> > > > Jonas Fernandes
> > > > Equilibrium TI
> > > > Desenvolvimento
> > >
> > >
> > >
> > >
> > > --
> > > Atenciosamente
> > > Jonas Fernandes
> > > Equilibrium TI
> > > Desenvolvimento
> > >
> > >
> >
> >
> > --
> > http://www.multitask.com.au/people/dion/
> > Rule of Acquisition #91: Hear all, trust nothing.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Atenciosamente
> Jonas Fernandes
> Equilibrium TI
> Desenvolvimento
>



-- 
Atenciosamente
Jonas Fernandes
Equilibrium TI
Desenvolvimento

Re: Using HtmlEmail to send mail

Posted by Jonas Fernandes <jj...@gmail.com>.
Dion,
The problem is:

We have a Exchange 2000 Server working here.  This Server requires
authentication. So, i do all steps that the most examples said... The error
that show is simply:
org.apache.commons.mail
>
> .EmailException:
>       Sending the email to the following server failed : mybuss:25



This code below is exactly the code that i use here (I change the names
only)...
 I dont know what can do... I have search in Google some similar problem,
and dont match... So, if u can help me a little bit...




On 10/4/06, Dion Gillard <di...@gmail.com> wrote:
>
> Do you have a longer stack trace for us to help with?
>
> On 10/5/06, Jonas Fernandes <jj...@gmail.com> wrote:
> > ops, error type:
> >
> >                     email.setHostName("mybuss");
> >                     email.setFrom("joe@mybuss.com", "Joe");
> >                     email.addTo(" jack@mybuss.com", "Jack");
> //email.addTo("
> > jack@mybuss", "Jack");
> >                     email.setSubject("Test");
> >                     email.setHtmlMsg("<b>Hello</b> dude!");
> >                     email.setAuthentication ("joe", "pass123");
> >                     email.send();
> >
> > On 10/4/06, Jonas Fernandes <jj...@gmail.com> wrote:
> > >
> > >
> > > Hi everybody,
> > >
> > > Well, i have a problem to use HtmlEmail.
> > >
> > > code :
> > >
> > >                 HtmlEmail email = new HtmlEmail();
> > >
> > >                 try
> > >                 {
> > >
> > >                     email.setHostName("mybuss");
> > >                     email.setFrom("joe@mybuss.com", "Joe");
> > >                     email.addTo(" jack@mybuss", "Jack");
> > >                     email.setSubject("Test");
> > >                     email.setHtmlMsg("<b>Hello</b> dude!");
> > >                     email.setAuthentication ("joe", "pass123");
> > >                     email.send();
> > >
> > >
> > >                 }
> > >                 catch(EmailException ex)
> > >                 {
> > >                     System.out.println(ex.toString());
> > >                 }
> > >
> > >
> > >     And when i run this code, the follow exception:
> > >
> > >    org.apache.commons.mail.EmailException:
> > >      Sending the email to the following server failed : mybuss:25
> > >
> > >      PS.: The user joe and joe´s password are correct. The Hostname
> too...
> > > This network configuration i use in an ASP Component to send Email too
> and
> > > work correctly!!!
> > >
> > >
> > >
> > >
> > > What´s Wrong???
> > >
> > >
> > > Atenciosamente
> > > Jonas Fernandes
> > > Equilibrium TI
> > > Desenvolvimento
> >
> >
> >
> >
> > --
> > Atenciosamente
> > Jonas Fernandes
> > Equilibrium TI
> > Desenvolvimento
> >
> >
>
>
> --
> http://www.multitask.com.au/people/dion/
> Rule of Acquisition #91: Hear all, trust nothing.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


-- 
Atenciosamente
Jonas Fernandes
Equilibrium TI
Desenvolvimento

Re: Using HtmlEmail to send mail

Posted by Dion Gillard <di...@gmail.com>.
Do you have a longer stack trace for us to help with?

On 10/5/06, Jonas Fernandes <jj...@gmail.com> wrote:
> ops, error type:
>
>                     email.setHostName("mybuss");
>                     email.setFrom("joe@mybuss.com", "Joe");
>                     email.addTo(" jack@mybuss.com", "Jack"); //email.addTo("
> jack@mybuss", "Jack");
>                     email.setSubject("Test");
>                     email.setHtmlMsg("<b>Hello</b> dude!");
>                     email.setAuthentication ("joe", "pass123");
>                     email.send();
>
> On 10/4/06, Jonas Fernandes <jj...@gmail.com> wrote:
> >
> >
> > Hi everybody,
> >
> > Well, i have a problem to use HtmlEmail.
> >
> > code :
> >
> >                 HtmlEmail email = new HtmlEmail();
> >
> >                 try
> >                 {
> >
> >                     email.setHostName("mybuss");
> >                     email.setFrom("joe@mybuss.com", "Joe");
> >                     email.addTo(" jack@mybuss", "Jack");
> >                     email.setSubject("Test");
> >                     email.setHtmlMsg("<b>Hello</b> dude!");
> >                     email.setAuthentication ("joe", "pass123");
> >                     email.send();
> >
> >
> >                 }
> >                 catch(EmailException ex)
> >                 {
> >                     System.out.println(ex.toString());
> >                 }
> >
> >
> >     And when i run this code, the follow exception:
> >
> >    org.apache.commons.mail.EmailException:
> >      Sending the email to the following server failed : mybuss:25
> >
> >      PS.: The user joe and joe´s password are correct. The Hostname too...
> > This network configuration i use in an ASP Component to send Email too and
> > work correctly!!!
> >
> >
> >
> >
> > What´s Wrong???
> >
> >
> > Atenciosamente
> > Jonas Fernandes
> > Equilibrium TI
> > Desenvolvimento
>
>
>
>
> --
> Atenciosamente
> Jonas Fernandes
> Equilibrium TI
> Desenvolvimento
>
>


-- 
http://www.multitask.com.au/people/dion/
Rule of Acquisition #91: Hear all, trust nothing.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Using HtmlEmail to send mail

Posted by Jonas Fernandes <jj...@gmail.com>.
ops, error type:

                    email.setHostName("mybuss");
                    email.setFrom("joe@mybuss.com", "Joe");
                    email.addTo(" jack@mybuss.com", "Jack"); //email.addTo("
jack@mybuss", "Jack");
                    email.setSubject("Test");
                    email.setHtmlMsg("<b>Hello</b> dude!");
                    email.setAuthentication ("joe", "pass123");
                    email.send();

On 10/4/06, Jonas Fernandes <jj...@gmail.com> wrote:
>
>
> Hi everybody,
>
> Well, i have a problem to use HtmlEmail.
>
> code :
>
>                 HtmlEmail email = new HtmlEmail();
>
>                 try
>                 {
>
>                     email.setHostName("mybuss");
>                     email.setFrom("joe@mybuss.com", "Joe");
>                     email.addTo(" jack@mybuss", "Jack");
>                     email.setSubject("Test");
>                     email.setHtmlMsg("<b>Hello</b> dude!");
>                     email.setAuthentication ("joe", "pass123");
>                     email.send();
>
>
>                 }
>                 catch(EmailException ex)
>                 {
>                     System.out.println(ex.toString());
>                 }
>
>
>     And when i run this code, the follow exception:
>
>    org.apache.commons.mail.EmailException:
>      Sending the email to the following server failed : mybuss:25
>
>      PS.: The user joe and joe´s password are correct. The Hostname too...
> This network configuration i use in an ASP Component to send Email too and
> work correctly!!!
>
>
>
>
> What´s Wrong???
>
>
> Atenciosamente
> Jonas Fernandes
> Equilibrium TI
> Desenvolvimento




-- 
Atenciosamente
Jonas Fernandes
Equilibrium TI
Desenvolvimento