Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1226

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<!--- Increment the string index used in finding images. --->
<cfset findstart = stringstart[i] +5 >
<!--- Get text to the right of âBADCHAR˜cid:.âBADCHAR™
Using a string length of 30 should get more than the image name. --->
<cfset rightpart[i]=Mid(htmlmessage, findstart, 30)>
<!--- use the ListFirst function to remove all the text starting
at the quotation mark. --->
<cfset imagename[i]=ListFirst(rightpart[i], '"')>
<!--- Loop over the attachments query and find the CID. --->
<cfloop query="attachments">
<!--- Replace the image name with the contents of the attachment --->
<cfif attachments.CID EQ imagename[i]>
<cfset htmlmessage = Replace(htmlmessage,"cid:#imagename[i]#",
"attachments/#attachments.ATTACHMENTFILENAME#")>
</cfif>
</cfloop>
</cfloop>
<h3>The full mail message</h3>
<cfoutput>#htmlmessage#</cfoutput>
<cfexchangeconnection
action="close"
connection = "testconn">
Modifying Exchange items
You can modify any elements of calendar, contact, and task items that you can set in ColdFusion. For mail message,
you can change the
Importance
folders.
Note: If an item has attachments and you specify attachments when you modify the item, the new attachments are added
to the previous attachments; they do not replace them. Use the
changed attachments.
Modifying calendar, contact, and task items
You can modify calendar, contact, and task items by using the
tag with an
cfexchangetask
a structure that contains the item properties that you want to change, and their new values. You do not have to specify
the values for properties that you are not changing. To change the end time of a calendar task, for example, you specify
only an
field in the
EndTime
The following example lets you create, and then modify a calendar event. When you first submit the form, ColdFusion
creates the calendar event and redisplays the form with the data you entered. Accept the event before you modify the
form and resubmit it. When you submit the form a second time, ColdFusion sends the modification information. For
information about accepting events, see
The following example resends all the event data (to limit the example length), but you could change the example so
that it only sends modified data. This example also omits recurrence information to keep the code relatively simple:
,
, and
Sensitivity
IsRead
attribute value of
action
modify
attribute structure.
event
"Working with meetings and
Last updated 1/20/2012
flags, and you can move the mail messages between
action to remove any obsolete or
deleteAttachments
,
cfexchangecalendar
cfexchangecontact
. You specify a
,
contact
event
appointments" on page 1225.
1221
, or
, or
attribute with
task

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents