Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coldfusion with mailto tag 1

Status
Not open for further replies.

arilvade

IS-IT--Management
Mar 17, 2005
32
US
This code below opens the users default e-mail and inserts database data into the body - the problem is it also inserts a line of code with it:
?Body=Please+scan+the+following+document:
Anyway to get rid of the above code?
Thanks!



FORM ACTION="mailto:dav@nav.com?subject=Document Scan Request&body=">
<br> <br>

<TR>
<TD align=center>
<TEXTAREA COLS="50" ROWS="8" NAME="Body">
Please scan the following document:
<CFOUTPUT QUERY="query" STARTROW=1 MAXROWS=1>
Task ID: #trim(ti_id)#
Class: #trim(ti_type)#-#trim(ti_class)#
Type: #trim(ti_task)#
Number: #trim(ti_num)#
Rev: #trim(ti_rev)# &nbsp;&nbsp;Increment: #trim(ti_incr)#
Title: #trim(ti_brief)#
</CFOUTPUT>
</TEXTAREA>
</TD>
</TR>
<br>
<TR>
<TD align=center><input type=submit value="Submit"></TD>
</TR>
</TABLE>
</FORM>
</DIV>
</body>







</html>
 
Could you put the instructions outside the form, like this? You might also want to put the subject in as a hidden field.

<FORM ACTION="mailto:dav@nav.com">
<input type="hidden" name="subject" value="Document Scan Request">
<br> <br>

<TR>
<TD align=center>Please scan the following document:<br>
<TEXTAREA COLS="50" ROWS="8" NAME="body">
<CFOUTPUT QUERY="query" STARTROW=1 MAXROWS=1>
Task ID: #trim(ti_id)#
Class: #trim(ti_type)#-#trim(ti_class)#
Type: #trim(ti_task)#
Number: #trim(ti_num)#
Rev: #trim(ti_rev)# &nbsp;&nbsp;Increment: #trim(ti_incr)#
Title: #trim(ti_brief)#
</CFOUTPUT>
</TEXTAREA>
</TD>
</TR>
<br>
<TR>
<TD align=center><input type=submit value="Submit"></TD>
</TR>
</TABLE>
</FORM>
</DIV>
</body>
 
It does work; but is there anyway to get rid of the plus signs? (see below)

Thanks!


Document+Scan+Request
Please+scan+the+following+document:


Task_ID:5753
Class:_AS-39
Type:_AER
Number:_UTMC
Rev:__  Increment:_
Title:_UT+MAIN+CONDENSER
 
Not really, not the way you're doing it. The problem is that you're submitting a form with the "GET" method and it substitutes spaces with plus signs. The best way to do something like this is to do it with these steps.

1. Let the user input their information in a form.
2. Process the form data on the server.
3. Use the server to send the email using <cfmail>.

The example at shows you how to do it. You can display your database information and ask them to okay it, and then have the <cfmail> tag send the email.

Post back if it doesn't make sense. Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top