Publishing your app by Email with ANT

This post has a video that explains how to you use ANT to email your source code and or swf (or .air) file to the client (if you need to). It even involves how to zip the project up using ANT as well.

To use email with ant you need the following 3 jar files installed.

After you download the files you need to put them into your ant directory under your eclipse install “/plugins/org.apache.ant_******/ folder. If you watch the video, I explain how to find the ant folder if you don’t know where it is. For me it is “C:\Program Files\Adobe\Flex Builder 3\plugins\org.apache.ant_1.7.0.v200706080842\lib”. That is where all the ant jar files are held. You need to put the jar’s you downloaded into that folder, and then in eclipse you need to do the following.

  1. Window > Preferences > (on left tree) Ant > Runtime
  2. Once you’ve clicked on “Runtime” you’ll see a tree in the right side and the first entry should say “Ant Home Entries(Default) you need to click that, and then all of the buttons on the right will become enabled to click on
  3. click on “Add External JARs
  4. browse to your ant directory where all the jars are (for me its C:\Program Files\Adobe\Flex Builder 3\plugins\org.apache.ant_1.7.0.v200706080842\lib)
  5. highlight your jar files that you downloaded and click ok (ant-javamail.jar,activation.jar,mail.jar)
  6. click apply
  7. restart flex builder or eclipse (whichever you are using)

Now we are finally ready to get into the ANT part…

Start by going into whatever flex project you want (or creating one) and then create two files under the root.

##### EMAIL PROPERTIES ##### email.server = email.ssl = true email.user = email.from = email.password = myReallyStrongPassword = email.port = 465 ##### ZIP PROPERTIES ##### zip.destinationFile = E:/fb3Workspace/TempPublish/${zip.filename}.zip zip.filename = src-code zip.dir = E:/fb3Workspace/TempPublish/src


<project name="Publishing your project via Email with ANT">