If you were on the mini app part of the site and clicked on the submit to send the info you would go through the script..it saves the info into the SQL 6.5 database and then when it is suppose to email Apply@cool.com with the formated info it gives the error and when you click on the script it after the error result it gives you a mail connection error written in the error trapping which is in the code below....? Can someone help me on this...Could it be my SMTP setup or something else...because it does save the info in the database and it just messes up on the mail send...Thank you ~NiNjA~
dbConnect("yes" theMess = ""; if (isThere(request.jobName)) { theMess = "\nJob Title: " + request.jobName; } database.beginTransaction(); sql = "insert into applications(lastname,firstname,addr1,addr2,city,state,zipcode," + "phone,email,comments,workType,username,password) Values ('" + jobFix(request.lastName)+ "', '" +jobFix(request.firstName)+ "', '" + jobFix(request.addr1)+ "', '" +jobFix(request.addr2)+ "', '" + jobFix(request.city)+ "', '" +jobFix(request.state)+ "', '" + jobFix(request.zipCode)+ "', '" +jobFix(request.phone)+ "', '" + request.email+ "', '" +jobFix(request.comments)+ "', " + request.workType+ ", '', '') " dbError = database.execute(sql); if(isThere(request.jobChoice)) { sql = "select appID from applications where lastname='" +jobFix(request.lastName)+ "' " + "and firstname='" +jobFix(request.firstName)+ "' order by appID desc"; curs = database.cursor(sql); if (curs.next()) { sql = "insert into applications_jobs(appNum,jobNum,workFair) Values (" + curs.appID+ ", '" +request.jobChoice; if (request.source=="Work Fair" { sql += "', 'Yes')"; } else { sql += "', 'No')"; } curs.close(); dbError += database.execute(sql); } else { curs.close(); } theMess += "\nJob Number: " + request.jobChoice; } if (dbError) { database.rollbackTransaction(); } else { database.commitTransaction(); } theMess += "\nLast Name: " + request.lastName + "\nFirst Name: " + request.firstName + "\nAddress: " + request.addr1 +" "+ request.addr2 + "\nCity: " + request.city + "\nState: " + request.state + "\nZip Code: " + request.zipCode + "\nPhone: " + request.phone + "\nEmail: " + request.email + "\nComments: " + request.comments; msg = new SendMail(); msg.To = "apply@cool.com"; msg.From = request.email; msg.Subject = request.source + " Submission"; msg.Body = theMess; if (!msg.send()) { write('ERROR
'); write('\n
The data could not be submitted due to an unforeseen error.'); write('\n
Please check everything and try again.'); write('\n '); } else { write('\n
Thank you for submitting your information.
A representative will contact you soon.'); } dbDisconnect();
dbConnect("yes" theMess = ""; if (isThere(request.jobName)) { theMess = "\nJob Title: " + request.jobName; } database.beginTransaction(); sql = "insert into applications(lastname,firstname,addr1,addr2,city,state,zipcode," + "phone,email,comments,workType,username,password) Values ('" + jobFix(request.lastName)+ "', '" +jobFix(request.firstName)+ "', '" + jobFix(request.addr1)+ "', '" +jobFix(request.addr2)+ "', '" + jobFix(request.city)+ "', '" +jobFix(request.state)+ "', '" + jobFix(request.zipCode)+ "', '" +jobFix(request.phone)+ "', '" + request.email+ "', '" +jobFix(request.comments)+ "', " + request.workType+ ", '', '') " dbError = database.execute(sql); if(isThere(request.jobChoice)) { sql = "select appID from applications where lastname='" +jobFix(request.lastName)+ "' " + "and firstname='" +jobFix(request.firstName)+ "' order by appID desc"; curs = database.cursor(sql); if (curs.next()) { sql = "insert into applications_jobs(appNum,jobNum,workFair) Values (" + curs.appID+ ", '" +request.jobChoice; if (request.source=="Work Fair" { sql += "', 'Yes')"; } else { sql += "', 'No')"; } curs.close(); dbError += database.execute(sql); } else { curs.close(); } theMess += "\nJob Number: " + request.jobChoice; } if (dbError) { database.rollbackTransaction(); } else { database.commitTransaction(); } theMess += "\nLast Name: " + request.lastName + "\nFirst Name: " + request.firstName + "\nAddress: " + request.addr1 +" "+ request.addr2 + "\nCity: " + request.city + "\nState: " + request.state + "\nZip Code: " + request.zipCode + "\nPhone: " + request.phone + "\nEmail: " + request.email + "\nComments: " + request.comments; msg = new SendMail(); msg.To = "apply@cool.com"; msg.From = request.email; msg.Subject = request.source + " Submission"; msg.Body = theMess; if (!msg.send()) { write('ERROR
'); write('\n
The data could not be submitted due to an unforeseen error.'); write('\n
Please check everything and try again.'); write('\n '); } else { write('\n
Thank you for submitting your information.
A representative will contact you soon.'); } dbDisconnect();