Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 23rd, 2007, 10:25 AM
danarashad danarashad is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 1 danarashad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 11 sec
Reputation Power: 0
CFMAIL Problems

i am having problems with cf mail, i am getting duplicate emails. the code is not in a loop. thanks for any help.


<cfif isdefined('fs') and fs is 4 and form.show_name EQ "1. College Course Graduate Level" or fs is 4 and form.show_name is "2. College Course Undergraduate Level"
or fs is 4 and form.show_name is "8. Approved State/National committees"
or fs is 4 and form.show_name is "13. Attendance at approved state/national conventions clincs or conference"
or fs is 4 and form.show_name is "14. State or National officer in approved professional organizations">

<cfupdate datasource="#datasource#" tablename="proff" formfields="name, date1, userID, assignment, school, show_name,show_trait, show_report, des, location, goal, pre_reg, reg1, trans1, lodging1, other1, total1, pre_reg2,
reg3, checknum, date6, po, budget, hours, points, app, date7, principal, denied, tent, points2, supper, date2, one, two, three, four, five, comments, hours2, app2, date4, pointsappr, personnel, activity_name, date5">

<cfquery name="stupendousCheckQRY"datasource="#datasource#">
select rec_id from formApprasialStateP
where teacherID=#sid# and teacherStatus = 3 and appraiserStatus=3 and semesterID=#trim(form.semCode)# <cfif isdefined('formID')>
</cfif>
</cfquery>

<cfif stupendousCheckQRY.recordCount gt 0>
<cflocation url="index.cfm?sec=#sec#">
</cfif>
<cfscript>
form.form_id=#rec_id#;
form.jobID=#trim(form.jobID)#;
form.keyName=10;
form.teacherID=#session.auth.userID#;
form.teacherStatus=2;
form.appraiserStatus=1;
form.cycle=#tdc#;
form.cycleYear=#ty#;
form.status=#status#;
form.saved=2;
form.teacherDate=#now()#;
semesterID=#trim(form.semCode)#;
</cfscript>
<cfquery name="AppraisalStateCheckQRY" datasource="#datasource#">
select rec_id from formApprasialStateP
where teacherID=#sid# and semesterID=#trim(form.semCode)# and form_id=#trim(form.form_id)# <cfif isdefined('formID')>and rec_id=#trim(form.formID)#</cfif>
</cfquery>
<cfif AppraisalStateCheckQRY.recordCount is 0>
<cfquery name="AppraisalStateCheckQRY" datasource="#datasource#">
select rec_id from formApprasialStateP
where jobID=#trim(form.jobID)# and semesterID=#trim(form.semCode)# and form_id=#trim(form.form_id)#
</cfquery>
<cfset tempRecID=AppraisalStateCheckQRY.rec_id>
<cfelse>
<cfset form.rec_id=AppraisalStateCheckQRY.rec_id>
<cfupdate datasource="#datasource#" tablename="formApprasialStateP" formfields="teacherID, form_id, teacherStatus, appraiserStatus, cycle, cycleYear, saved, teacherDate, semesterID, status">

<cfset tempRecID=AppraisalStateCheckQRY.rec_id>
</cfif>
<cfquery name="appraiserCheck" datasource="#datasource#">
select myAppraiser, myAltAppraiser from demographics where id=#session.auth.userID#
</cfquery>
<cfif appraiserCheck.myAppraiser GT 0>
<cfset thisAppraiserCheck=appraiserCheck.myAppraiser>
<cfelseif appraiserCheck.myAltAppraiser gt 0>
<cfset thisAppraiserCheck=appraiserCheck.myAltAppraiser>
<cfelse>
<cfset thisAppraiserCheck=0>
</cfif>
<cfquery name="toEmailQRY" datasource="#datasource#">
select username from demographics where id=#thisAppraiserCheck#
</cfquery>
<cfquery name="fromEmailQRY" datasource="#datasource#">
select username, fName, lName from demographics where id=#session.auth.userID#</cfquery>
<cfquery name="formName" datasource="#datasource#">
select formName from formName where keyName=10
</cfquery>
<!-- email get sent to HR -->
<!--- We do not want ColdFusion to suppress whitespace here --->


here's the emailing code, i dont understand why i get sent 2 emails, the code isnt in any loops.
<CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE="No">

<CFMAIL
SUBJECT="#emailsubject#"
FROM="#fromEmail#"
TO="#toemail#"
SERVER="#mailserver#"
>
has completed the #emailSubject#.
Please login to the system and respond.
#emailNotificationLink#
#messageForm#

</CFMAIL>
</CFPROCESSINGDIRECTIVE>
<cflocation url="index.cfm?sec=#sec#">
</cfif>
<!-- end of email -->

Reply With Quote
  #2  
Old May 28th, 2007, 08:23 PM
gavy gavy is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 31 gavy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 29 m 42 sec
Reputation Power: 12
only post

POst my friend only the code which is causing problem, why reading the whole code, i do not have enough time

thanks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > CFMAIL Problems


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap