You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kashif Inam <ka...@gmail.com> on 2006/04/08 08:46:08 UTC
Commons Email - Mail Sending Error
Hi
I am using Commons Email, SimpleEmail object is created and values are being
set. But when i execute that code, it throughs
exception with following description
"errorsorg.apache.commons.mail.EmailException: Sending the email to the
following server failed :"
Please suggest me to resolve my problem. I have written following code
/*********************************************************************************/
SimpleEmail email = new SimpleEmail();
email.setHostName("mail.myserver.com");
//email.setSmtpPort(465);
email.addTo(" test@gmail.com", "XYZ");
email.setFrom("test@server.com", "FROM");
email.setSubject("Subject");
email.setMsg("Sample Text");
email.send();
/*****************************************************************************/
Thanks
Kashif Inam
Re: Commons Email - Mail Sending Error
Posted by "C. Grobmeier" <gr...@possessed.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Having a similar problem lateley, i forgot to set the authenticator.
Do you have the "relay access denied" problem? Looks like that...
Regards,
Chris
Dion Gillard wrote:
> Any more detail in the exception stack trace?
>
> On 4/8/06, Kashif Inam <ka...@gmail.com> wrote:
>> Hi
>>
>> I am using Commons Email, SimpleEmail object is created and values are
>> being
>> set. But when i execute that code, it throughs
>> exception with following description
>>
>> "errorsorg.apache.commons.mail.EmailException: Sending the email to the
>> following server failed :"
>>
>> Please suggest me to resolve my problem. I have written following code
>>
>> /*********************************************************************************/
>> SimpleEmail email = new SimpleEmail();
>>
>> email.setHostName("mail.myserver.com");
>> //email.setSmtpPort(465);
>> email.addTo(" test@gmail.com", "XYZ");
>> email.setFrom("test@server.com", "FROM");
>> email.setSubject("Subject");
>> email.setMsg("Sample Text");
>> email.send();
>>
>>
>> /*****************************************************************************/
>>
>> Thanks
>> Kashif Inam
>>
>>
>
>
> --
> http://www.multitask.com.au/people/dion/
> Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
> of the dark, but because the dark is afraid of Chuck Norris
>
- --
Christian Grobmeier
Possessed Management
Hurlacher Str. 5 - 86853 Langerringen - Germany
E-Mail: grobmeier@possessed.de
Mobil: +(49)(0)175 57 66830
Fax: +(49) (0)8232 959119
Web: http://www.possessed.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEOh5kkv8rKBUE/T4RAsCaAJ4xcG8ysSbXyZbekZCwFRj6tGlM2QCfRxB9
wORjdc5uQTwj1wiCVFEkU84=
=jN9G
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Commons Email - Mail Sending Error
Posted by Dion Gillard <di...@gmail.com>.
Any more detail in the exception stack trace?
On 4/8/06, Kashif Inam <ka...@gmail.com> wrote:
>
> Hi
>
> I am using Commons Email, SimpleEmail object is created and values are
> being
> set. But when i execute that code, it throughs
> exception with following description
>
> "errorsorg.apache.commons.mail.EmailException: Sending the email to the
> following server failed :"
>
> Please suggest me to resolve my problem. I have written following code
>
> /*********************************************************************************/
> SimpleEmail email = new SimpleEmail();
>
> email.setHostName("mail.myserver.com");
> //email.setSmtpPort(465);
> email.addTo(" test@gmail.com", "XYZ");
> email.setFrom("test@server.com", "FROM");
> email.setSubject("Subject");
> email.setMsg("Sample Text");
> email.send();
>
>
> /*****************************************************************************/
>
> Thanks
> Kashif Inam
>
>
--
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris