ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NR031 <nataraja...@cognizant.com>
Subject Sending mails from ant script
Date Mon, 16 Mar 2009 07:03:56 GMT

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


Mime
View raw message