<tb*******@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Ok here's the deal. The if/then/else code works fine.. What the problem
seems to be is that when I put the cdonts code inside the "insert
record" code the variable isn't getting the correct value.. However, if
I put the cdonts code anywhere else the variable gets the correct value
assinged to it.
As I've said: "You may have to post a stripped version of your code."
I have many pages setup with this same cdonts code and set in the same
place. Totally stumped...
Use an "include" file with the "same cdonts code" and change it once.
<!--#include file="CDO_Code.asp"-->
Construct the "body" in a variable then pass it in to a "include" function:
email("BF**************@fpfc.net",MyVarMailto,"BFS Loan Referral",MyVarBody)
// CDO_Code.asp
function email(eFrom,eTo,eSubj,eBody)
var cdomail;
cdomail = Server.CreateObject("cdonts.newmail");
cdomail.from = eFrom;
cdomail.to = eTo;
cdomail.subject = eSubj;
cdomail.body = eBody;
cdomail.MailFormat = 0;
cdomail.BodyFormat = 0;
cdomail.send();
}
Prepare a standalone page to test it:
<% @Language="JScript" %>
<!--#include file="CDO_Code.asp"-->
<html>
<head>
<title>CDO_Test.asp</title>
<% var eFrom = "BF**************@fpfc.net";
var eTo = "... an email address ...;
var eSubj = "BFS Loan Referral";
var eBody = "... HTML source code ...";
email(eFrom,eTo,eSubj,eBody)
%>
</head>
</body>
</html>
I haven't tested this; also, I normally do server-side in VBScript.
CDO.Message() has replaced CDONTS.NewMail():
How do I send e-mail with CDO?
URL:
http://classicasp.aspfaq.com/email/h...-with-cdo.html
Also, what if someone wants a loan of exactly $250,000?
Size of Loan Request:
<select name="LoanRequest" id="LoanRequest">
<option value="null" selected>Select size of loan.
<option value="1">Under $250,000
<option value="2">Over $250,000
</select>
(Obviously I recovered you email and looked at the code.)