alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Ant example source code file (mail.xml)

This example Ant source code file (mail.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Ant tags/keywords

hi, hi, laura, laura, ssl, ssl

The mail.xml source code

<?xml version="1.0"?>

<project name="mail-test" basedir="." default="test1">

  <target name="test1">
    <!-- this test is supposed to bring a build exception because user and password is not allowed with plain encoding -->
    <mail host="localhost" port="25" from="joe@abc.com" to="laura@xyz.com" subject="hello" encoding="plain" user="joe" password="secret">
        <message>
            Hi Laura, how are you doing ?
        </message>
    </mail>
  </target>
  <target name="test2">
      <!-- this test is supposed to bring a build exception because SSL is not allowed with plain encoding -->
      <mail host="localhost" port="465" from="joe@abc.com" to="laura@xyz.com" subject="hello" encoding="plain" ssl="true">
          <message>
              Hi Laura, how are you doing ?
          </message>
      </mail>
    </target>



</project>

Other Ant examples (source code examples)

Here is a short list of links related to this Ant mail.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.