Not finding what you are looking for? Request a recipe!
ColdFusion has several in-built functions that we can utilise to solve this problem. Two possible solutions are shown below.
Some email clients are text only and don't understand HTML content. With ColdFusion it simple to send multi part emails using the <cfmail> and <cfmailpart> tags.
In Eclipse IDE, which Flex / Flash Builder and CF Builder are based on, you can change the font size in the preferences.
To stop the browser opening the file and show a save dialog instead, you can use the cfheader and cfcontent tags.
ColdFusion 8 introduced a several powerful image manipulation functions which we can use to solve this problem.
Use the <cfdirectory> tag to retrieve a list of all the images in a specified directory, then use the RandRange function to select one randomly.
By taking advantage of the fact that ColdFusion runs on Java, we can use java.util.Arrays class to get a range of elements from an array of words.
Because Coldfusion is built on top of java we can take advantage of some of the java methods. One of these is addAll(), which merges two arrays together.
This is a simple example of some code that will generate a random password, 3 characters long from the letters A to Z.