I have added this in my pom.xml . I am on windows7 , I am using java+testng to write automation scripts. Do I need postfix smtp server to send emails, thats why below code is not running for me, because same code is running on ubuntu machine, which has postfix installed.
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<executions>
<execution>
<id>send a mail</id>
<phase>test</phase>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>false</inherited>
<configuration>
<from>test123@test.com</from>
<subject> Test Results</subject>
<failonerror>true</failonerror>
<mailhost></mailhost>
<receivers>
<receiver>paul.lev007@gmail.com</receiver>
</receivers>
<htmlMessageFile>target/surefire-reports/emailable-report.html</htmlMessageFile>
</configuration>
</execution>
</plugin>