I am using Selenium WebDriver, TestNG, Ant, Page Object Factory and Jenkins (not Maven)-
How do i sent email automatically once the build success from Jenkins.
Steps i followed :-
1. Email setting in Jenkins --> No issue
2.clicked on Build in Jenkins --> No issue
[b:20hugdl0]3. Build Pass(No Email)[/b:20hugdl0] - [b:20hugdl0][color=#408000:20hugdl0]But I also want the email when build success.[/color:20hugdl0][/b:20hugdl0]
4. Build Failed >> Received email to My email Address and all Recipient i added in Jenkins. --> No issue
[b:20hugdl0]My Requirement -
Email should trigger to all recipient with report in email with proper format([color=#00FF80:20hugdl0]even if build fails or pass[/color:20hugdl0])[/b:20hugdl0]
Solution -
I have got one solution on stackoverflow - http://stackoverflow.com/questions/24070132/jenkins-sending-email-based-on-each-build-step-result-in-same-jenkins-job
Email-ext plugin of Jenkins
But Email-ext plugin is asking to install maven 3 BUT [b:20hugdl0]We are using only ANT so how will this work[/b:20hugdl0]?
It is saying Maven need to be installed - Make sure you have installed Maven 3 (why?) and JDK 6.0 or later. Make also sure you have properly configured your ~/.m2/settings.xml as explained in the Plugin Tutorial. This is needed to build properly any Jenkins plugin.
[b:20hugdl0]Alternate Solution Needed for Ant???[/b:20hugdl0]
M
Replied on 22/11/2015
I have got the solution through Ant task Mail.
https://ant.apache.org/manual/Tasks/mail.html
I thought it would be good to share the learning with all.