|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
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 --> |
|
#2
|
|||
|
|||
|
only post
POst my friend only the code which is causing problem, why reading the whole code, i do not have enough time
thanks |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > CFMAIL Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|