dcsimg
ANT mail logger - cannot send email
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   MILEY_LEHARI
Posted On:   Wednesday, February 4, 2009 07:18 PM

Hello Guru! I am getting a null pointer exception when trying to send email with mail logger. How ever I am able to send/recieve emails with out any problems using ANT mail task ( same server, config etc). I am not sure why the mail logger is not working. Am I missing some jar files. This is the error message: BUILD SUCCESSFUL Total time: 2 seconds MailLogger failed to send e-mail! java.lang.NullPointerException at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:206) at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java :332) at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav    More>>

Hello Guru!
I am getting a null pointer exception when trying to send email with mail logger. How ever I am able to send/recieve emails with out any problems using ANT mail task ( same server, config etc). I am not sure why the mail logger is not working. Am I missing some jar files.


This is the error message:

BUILD SUCCESSFUL

Total time: 2 seconds

MailLogger failed to send e-mail!

java.lang.NullPointerException

at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:206)

at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java
:332)

at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav
a:143)

at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2037)

at org.apache.tools.ant.Main.runBuild(Main.java:778)

at org.apache.tools.ant.Main.startAnt(Main.java:217)

at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)

at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


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

I copied mail.jar activation.jar ,ant-javamail.jar and mailapi.jar to my ANT_Home/lib directory.


I am using following command to run the ANT


ant -q -DMailLogger.properties.file=MailLogger.properties -logger org.apache.tools.ant.listener.MailLogger

------------------------------------------
MailLogger.properties has:

MailLogger.mailhost=xxxxxxxx

MailLogger.user=xxxxx

MailLogger.password=xxxxx

MailLogger.from=xxxx@xx

MailLogger.success.to=xxxx@xx

MailLogger.failure.to=xxxx@xx

MailLogger.failure.subject=Alert:Build Failed

MailLogger.success.subject=Alert:Build Successful


I have also included


in the build.xml.


Any help is Appreciated !!


Thanks
Miley

   <<Less
About | Sitemap | Contact