You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rhino <rh...@sympatico.ca> on 2004/10/19 06:07:01 UTC

Question about Mail task

I just tried using Ant's mail task for the first time and found something a bit odd: it gave me an error message but it worked anyway.

My task is:
<mail mailhost="smtp1.sympatico.ca" mailport="25" subject="Update of Doug's Movies">

<from address="${doug.email}"/>

<replyto address="${doug.email}"/>

<to address="${rhino.email}"/>

<message>Blah blah blah.</message>

</mail>

The message was created and sent without any apparent difficulty. However, the output from the build for this task was:
[mail] Failed to initialise MIME mail: javax/mail/MessagingException

[mail] Sending email: Update of Doug's Movies

[mail] Sent email with 0 attachments

What do I need to do to eliminate the MessagingException message?

I am using Ant 1.6.1 on Windows XP.

Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare

Re: Question about Mail task

Posted by Rhino <rh...@sympatico.ca>.
Thank you, that solved the problem!

The thing I don't understand is why my mail was sent successfully *despite*
the error I was getting. I didn't have either mail.jar or activation.jar in
my ${ANT_HOME}/lib directory. That suggests that neither jar is actually
needed to send email.

Did I simply get lucky because I was sending an email from one of my email
IDs to the other?

Rhino

----- Original Message ----- 
From: "Laconia Data Systems" <we...@laconiadatasystems.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Tuesday, October 19, 2004 7:24 AM
Subject: Re: Question about Mail task


Rhino
copy both mail.jar and activation.jar to %ANT_HOME%\lib
retry task
Martin
  ----- Original Message ----- 
  From: Rhino
  To: ant-user
  Sent: Tuesday, October 19, 2004 12:07 AM
  Subject: Question about Mail task



  I just tried using Ant's mail task for the first time and found something
a bit odd: it gave me an error message but it worked anyway.

  My task is:
  <mail mailhost="smtp1.sympatico.ca" mailport="25" subject="Update of
Doug's Movies">

  <from address="${doug.email}"/>

  <replyto address="${doug.email}"/>

  <to address="${rhino.email}"/>

  <message>Blah blah blah.</message>

  </mail>

  The message was created and sent without any apparent difficulty. However,
the output from the build for this task was:
  [mail] Failed to initialise MIME mail: javax/mail/MessagingException

  [mail] Sending email: Update of Doug's Movies

  [mail] Sent email with 0 attachments

  What do I need to do to eliminate the MessagingException message?

  I am using Ant 1.6.1 on Windows XP.

  Rhino
  ---
  rhino1 AT sympatico DOT ca
  "There are two ways of constructing a software design. One way is to make
it so simple that there are obviously no deficiencies. And the other way is
to make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare


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


Re: Question about Mail task

Posted by Ivan Ivanov <ra...@yahoo.com>.
I think the error cames from the fact that ant tries
to pick up mail.jar and send email via it. If it can't
find mail.jar it issues error and fall back of the its
own implemenation of mail sending and that is your
sending is successful anyway.

--- Laconia Data Systems
<we...@laconiadatasystems.com> wrote:

> Rhino
> copy both mail.jar and activation.jar to
> %ANT_HOME%\lib
> retry task
> Martin
>   ----- Original Message ----- 
>   From: Rhino 
>   To: ant-user 
>   Sent: Tuesday, October 19, 2004 12:07 AM
>   Subject: Question about Mail task
> 
> 
> 
>   I just tried using Ant's mail task for the first
> time and found something a bit odd: it gave me an
> error message but it worked anyway.
> 
>   My task is:
>   <mail mailhost="smtp1.sympatico.ca" mailport="25"
> subject="Update of Doug's Movies">
> 
>   <from address="${doug.email}"/>
> 
>   <replyto address="${doug.email}"/>
> 
>   <to address="${rhino.email}"/>
> 
>   <message>Blah blah blah.</message>
> 
>   </mail>
> 
>   The message was created and sent without any
> apparent difficulty. However, the output from the
> build for this task was:
>   [mail] Failed to initialise MIME mail:
> javax/mail/MessagingException
> 
>   [mail] Sending email: Update of Doug's Movies
> 
>   [mail] Sent email with 0 attachments
> 
>   What do I need to do to eliminate the
> MessagingException message?
> 
>   I am using Ant 1.6.1 on Windows XP.
> 
>   Rhino
>   ---
>   rhino1 AT sympatico DOT ca
>   "There are two ways of constructing a software
> design. One way is to make it so simple that there
> are obviously no deficiencies. And the other way is
> to make it so complicated that there are no obvious
> deficiencies." - C.A.R. Hoare



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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


Re: Question about Mail task

Posted by Laconia Data Systems <we...@laconiadatasystems.com>.
Rhino
copy both mail.jar and activation.jar to %ANT_HOME%\lib
retry task
Martin
  ----- Original Message ----- 
  From: Rhino 
  To: ant-user 
  Sent: Tuesday, October 19, 2004 12:07 AM
  Subject: Question about Mail task



  I just tried using Ant's mail task for the first time and found something a bit odd: it gave me an error message but it worked anyway.

  My task is:
  <mail mailhost="smtp1.sympatico.ca" mailport="25" subject="Update of Doug's Movies">

  <from address="${doug.email}"/>

  <replyto address="${doug.email}"/>

  <to address="${rhino.email}"/>

  <message>Blah blah blah.</message>

  </mail>

  The message was created and sent without any apparent difficulty. However, the output from the build for this task was:
  [mail] Failed to initialise MIME mail: javax/mail/MessagingException

  [mail] Sending email: Update of Doug's Movies

  [mail] Sent email with 0 attachments

  What do I need to do to eliminate the MessagingException message?

  I am using Ant 1.6.1 on Windows XP.

  Rhino
  ---
  rhino1 AT sympatico DOT ca
  "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare