----- Original Message ----- From: "Petar Tahchiev" <[EMAIL PROTECTED]>
To: "Ant Users List" <[email protected]>
Sent: Saturday, January 07, 2006 7:22 AM
Subject: Re: Problem with mail task


On 07/01/06, Rhino <[EMAIL PROTECTED]> wrote:

I have a fairly trivial 'mail' task in my Ant script that is giving me
this
output:
[mail] Failed to initialise MIME mail: javax/mail/MessagingException

[mail] Sending email: Update ZoneEdit Password

[mail] Sent email with 0 attachments

Even though the email was sent and received without difficulty, I am
concerned about the first line of output and would like to make this go
away
if it's not going to be a major pain.

The only parameters I am using are 'mailhost', 'from address', 'replyto
address', 'cc address', and 'message' and all of them appear to have valid
values since the email is sent and received fine.

What can I do to make that error message go away?

By the way, I've copied this 'mail' task from an older script but
according
to the article on 'mail' in the Ant 1.6.5 manual, the correct parameters
to
use are 'from', 'replyto', and 'cclist' _NOT_ 'from address', 'replyto
address', 'cc address'. Why are my parameters working even though they are
wrong? And why do I get an error when I try to use the parameters in the
manual? Strangely, the examples used for the 'mail' task also use 'from
address', and 'replyto address', making the article inconsistent with
itself! What's the story here?

I am using Ant 1.6.5 in Windows XP Pro (SP2 applied).

---
Rhino



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.14/222 - Release Date:
05/01/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


The message: "Failed to initialise MIME mail" usually comes when Ant can't
find Sun's JavaMail API in the ANT_HOME/lib directory. In case ant doesn't
find activation.jar and mail.jar in those directory it uses its own
implementation for sending mail. Maybe you use some old version of
actvation.jar and mail.jar? Or maybe the content type of your message is not
text/plain?
--
Regards, Petar!



--------------------------------------------------------------------------------

Thank you, Petar, that was exactly the problem! It all works perfectly now.

Rhino







--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.15/223 - Release Date: 06/01/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to