Failed to initialise MIME mail

View: New views
3 Messages — Rating Filter:   Alert me  

Failed to initialise MIME mail

by Chon, Ae H :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All,

 

Following is the mail task setting...and I'm getting a "Failed to initialize
MIME mail" error message.  Don't really know what's going on.

 

            <mail mailhost= "${mail.host}"

                  subject     = "BUILD FAILED:  ${product.name}
${major.ver}.${minor.ver}.${patch}.${build.num}"

                  charset = "utf-8"

                  failonerror = "false"

                  tolist      = "${cm.list.address},${metrics.address}"

                  messagemimetype = "text/html">

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

                  <message>Build failed due to errors! View
attached log file for details.  (Also look for a separate email that
contains details of the error.)</message>

                  <fileset dir = "${log.build.dir}">

                        <include name = "build.html"/>

                  </fileset>

            </mail>

 

And the contents of my mail looks like this...

 

Build failed due to errors! View attached log file for details. (Also look
for a separate email that contains details of the error.) begin 644
build.html M/&AT;6P^#0H\:&5A9#X-"CQ-151!(&AT=' M97%U:78](D-O;G1E;G0M5'EP
M92(@8V]N=&5N=#TB=&5X="]H=&UL.R!C:&%RPT*(" @(" @;6%R9VEN.B...

Ae Hwa Chon
Configuration Manager
SAIC
5113 Leesburg Pike
Skyline 4, Suite 502
Falls Church, VA 22041-3220
(W)  703-824-5863

 


Re: Failed to initialise MIME mail

by Ivan "Rambius" Ivanov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

--- "Chon, Ae H" <AE.H.CHON@...> wrote:

>             <mail mailhost= "${mail.host}"
>
>                   subject     = "BUILD FAILED:
> ${product.name}
> ${major.ver}.${minor.ver}.${patch}.${build.num}"
>
>                   charset = "utf-8"
>
>                   failonerror = "false"
>
>                   tolist      =
> "${cm.list.address},${metrics.address}"
>
>                   messagemimetype = "text/html">
>
>                   <from address     =
> "${from.address}" />
>
>                   <message>Build failed due to
> errors!

View

> attached log file for details.  (Also look for a
> separate email that
> contains details of the error.)</message>
>
>                   <fileset dir = "${log.build.dir}">
>
>                         <include name =
> "build.html"/>
>
>                   </fileset>
>
>             </mail>
I checked the documentation of <mail> task in [1] and
there is a similar example using a nested <fileset> as
well. Its explanation says: "The task will attempt to
use JavaMail and fall back to UU encoding or no
encoding in that order depending on what support
classes are available." So I suppose you need Java
Mail.

Regards
Ivan

[1]http://ant.apache.org/manual/CoreTasks/mail.html

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

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


Re: Failed to initialise MIME mail

by antoinell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Chon,

The message "failed to initialize mime mail" means that due to the absence
of mail.jar, ant will use its own implementation
of sending mail.

You wrote that ant does send an email, but the email does not look readable
:

>Build failed due to errors! View attached log file for details. (Also look
>for a separate email that contains details of the error.) begin 644
>build.html M/&AT;6P^#0H\:&5A9#X-"CQ-151!(&AT=' M97%U:78](D-O;G1E;G0M5'EP
>M92(@8V]N=&5N=#TB=&5X="]H=&UL.R!C:&%RPT*(" @(" @;6%R9VEN.B...

This "begin 644 build.html ... " kludge looks like the attachments that you
wanted to send.
For some reason, your email client is not able to detect that this is the
beginning of an attachment,
but displays it as text. Maybe you should end your text with a new line
before the beginning of the attachment

for instance, try writing your message like this :

 <message>Build failed due to errors! View
attached log file for details.  (Also look for a separate email that
contains details of the error.)
</message>

What you can also do is install mail.jar and activation.jar in the lib
directory of ant. Then ant will use Sun's email
implementation.


Antoine

----- Original Message -----
From: "Ivan Ivanov" <rambiusparkisanius@...>
To: "Ant Users List" <user@...>
Sent: Friday, December 16, 2005 11:44 PM
Subject: Re: Failed to initialise MIME mail


> Hello,
>
> --- "Chon, Ae H" <AE.H.CHON@...> wrote:
> >             <mail mailhost= "${mail.host}"
> >
> >                   subject     = "BUILD FAILED:
> > ${product.name}
> > ${major.ver}.${minor.ver}.${patch}.${build.num}"
> >
> >                   charset = "utf-8"
> >
> >                   failonerror = "false"
> >
> >                   tolist      =
> > "${cm.list.address},${metrics.address}"
> >
> >                   messagemimetype = "text/html">
> >
> >                   <from address     =
> > "${from.address}" />
> >
> >                   <message>Build failed due to
> > errors!
>
> View
> > attached log file for details.  (Also look for a
> > separate email that
> > contains details of the error.)</message>
> >
> >                   <fileset dir = "${log.build.dir}">
> >
> >                         <include name =
> > "build.html"/>
> >
> >                   </fileset>
> >
> >             </mail>
> I checked the documentation of <mail> task in [1] and
> there is a similar example using a nested <fileset> as
> well. Its explanation says: "The task will attempt to
> use JavaMail and fall back to UU encoding or no
> encoding in that order depending on what support
> classes are available." So I suppose you need Java
> Mail.
>
> Regards
> Ivan
>
> [1]http://ant.apache.org/manual/CoreTasks/mail.html
>


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