Displaying images in e-mails and articles
We've already covered much of this in earlier recipes so this will be a variation on a theme. We'll look at the more difficult task of adding an uploaded image into an e-mail.
Note
Actually we're going to add a link to the image into the e-mail. This means that some users may not see it if they are not connected to the Internet or if their e-mail reader blocks images by default.
It is technically possible to embed images in an e-mail but is beyond our abilities here.
Getting ready
We'll use the same form and include the image link alongside the download link that we created earlier.
How to do it...
1. Open the form in the Form Editor; click the Form Code tab and open the On Submit code - before email box. Check that the code from the previous recipe is still there, if it isn't then please add it:
<?php // get the form uploads information $MyUploads =& CFUploads::getInstance($MyForm->formrow->id); // extract the file path $file_path = $MyUploads...