ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Sending mails from ant script
Date Mon, 16 Mar 2009 14:35:35 GMT
I got a similar error, and yet the mail was still sent. My experience
with the mail.jar is that it is buggy and works spottily.

I am sure this is not what you wanted to hear, but at least you know
that other people have had similar issues.

You might be better off using a script to fire off your mail instead
of using this task. On Unix, it's pretty easy to replace this with the
"mail" command. On Windows, you can try blat <http://www.blat.net/>,

Normally, I would be against using a command when a perfectly good Ant
target is around. However, not only is this spotty, it isn't even
included in the stanard Ant installation anyway.

On Mon, Mar 16, 2009 at 3:03 AM, NR031 <nataraja.cp@cognizant.com> wrote:
>
> Hi,
>
>   I am getting NoClassDeffound exception when I tried to send mails. This
> is my code :
>
> <target name="email">
>        <mail mailhost="localhost" mailport="9080" tolist="xyz@abc.com"
> from="NR" message="Success"/>
>    </target>
>
> and this is what I am getting:
>
> email:
> Sending email: null
> java.lang.NoClassDefFoundError: javax/mail/MessagingException
>        at
> org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:155)
>        at
> org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:535)
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>        at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
>        at org.apache.tools.ant.Task.perform(Task.java:348)
>        at org.apache.tools.ant.Target.execute(Target.java:357)
>        at org.apache.tools.ant.Target.performTasks(Target.java:385)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>        at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>        at
> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
>        at
> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
>        at
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
> BUILD FAILED (total time: 0 seconds)
>
>
> I included mail and activation.jar into ant_home/lib path.
>
> --
> View this message in context: http://www.nabble.com/Sending-mails-from-ant-script-tp22532772p22532772.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message