[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Adding CDOMail SMTP Authentication / Correcting Form

Asked by coreybryant in Active Server Pages (ASP), Web Languages/Standards, Cascading Style Sheets (CSS)

I have the source code below to a form I am trying to fix.  However, the page does not seem to come up and I am not certain if the SMTP authentication fields are correct.

Can you take a look at the form to let me know what parameters I need to change to accomplish the SMTP authentication and also why it is not showing up?  Thanks!  An example is at http://www.milehighmerchantaccounts.com/contact.asp
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="includes/master.css" type="text/css" media="screen" />
	<!--[if gte IE 6]><link rel="stylesheet" href="includes/ieonly.css" type="text/css" media="screen" /><![endif]-->
	<link rel="stylesheet" href="includes/print.css" type="text/css" media="print" />
	<title>Accept Credit Cards - Get a Merchant Account</title>
	<meta name="description" content="Accept Credits Cards with a Merchant Account for your retail or Intenet business" />
	<meta name="keywords" content="merchant account, e-commerce, Quantum gateway, ecommerce, paypal, electronic payment gateway, credit cards, accept credit cards" />
	<script type="text/javascript" src="/includes/external-window-http.js"></script>
<script type="text/javascript" src="../includes/livevalidation.js"></script>
<style type="text/css">
<!--
.LV_validation_message{
    font-weight:bold;
	font-size: 80%;
    margin:0 0 0 5px;
    padding-right:10px;
	display:block;
}
 
.LV_valid {
    color:#00CC00;
}
                
.LV_invalid {
    color:#CC0000;
}
    
.LV_valid_field,
input.LV_valid_field:hover, 
input.LV_valid_field:active,
textarea.LV_valid_field:hover, 
textarea.LV_valid_field:active {
    border: 1px solid #00CC00;
}
    
.LV_invalid_field, 
input.LV_invalid_field:hover, 
input.LV_invalid_field:active,
textarea.LV_invalid_field:hover, 
textarea.LV_invalid_field:active {
    border: 1px solid #CC0000;
}
 
#Form1 {
    width:19em;
    margin:auto;
}
 
#Form1 fieldset {
	display: block;
	width: 17em;
	margin: 0 0 3em 0;
	padding: 0 1em 1em 1em;
	background-color: #EBEFF3;
}
 
#Form1 fieldset submit {
	border: none;
	background-color: transparent;
	text-align: left;
}
	
#Form1 fieldset textarea {
    width: 16em;
	height: 10em;
}
 
#Form1 fieldset.radio {
	width: 16em;
	margin: 1em 0 2em 0;
	background-color: #DDDDDD;
}
 
#Form1 fieldset.radio label {
	font-weight: normal;
}
 
#Form1 fieldset.radio input {
	clear: both;
	float: left;
	width: auto;
}
 
#Form1 fieldset input {
	display: block;
	width: 16em;
}
 
#Form1 fieldset label {
	display: block;
	margin-bottom: 1em;
	font-weight: normal;
}
 
#Form1 fieldset legend {
	display: block;
	margin-bottom: 1em;
}
#Form1 fieldset legend p {
	font-weight: normal;
	width: 16em;
	color: #000080;
	text-align:justify;
	}
 
#Form1 fieldset select {
	display: block;
	background-color: #EBEFF3;
	width: 16em;
}
#thanks {
display:block;
width:300px;
border:#003366 1px solid;
background-color:#FFFFCC;
margin:auto;
padding:6px;
}
-->
</style>
 
 
</head>
 
<body>
	<div id="wrap">
		<div id="masthead"><!--#INCLUDE FILE="includes/header.html" --></div> <!-- /masthead -->
		<div id="pri">
			<div class="pad">
<h2>Contact Us</h2>
<%
Select Case formAction
Case "start"
%>
<form action="contact.asp" method="post" name="Form1" id="Form1">
<fieldset>
<label for="selectedsubject">Select Subject<select name="selectedsubject" id="selectedsubject">
<option value="">-- Please Select a Subject --</option>
<option value="Information Request">Information Request</option>
<option value="Question">Question</option>
</select></label>
<script type="text/javascript">
var selectedsubject = new LiveValidation('selectedsubject');
selectedsubject.add( Validate.Presence );
for (i = 0; i < document.forms[0].selectedsubject.options.length; i++)
{
if (document.forms[0].selectedsubject.options[i].value == "<%=selectedsubject%>")
{
document.forms[0].selectedsubject.selectedIndex = i;
break;
}
}
</script>
<label for="yourname">Your name (required)<input id="yourname" name="yourname" type="text" value="<%=yourname%>" /></label>
<script type="text/javascript">
var yourname = new LiveValidation('yourname');
yourname.add( Validate.Presence );
</script>	
<label for="youremail">Your email (required)<input id="youremail" name="youremail" type="text" value="<%=youremail%>" /></label>
<script type="text/javascript">
var youremail = new LiveValidation('youremail');
youremail.add( Validate.Presence );
youremail.add( Validate.Email );
</script>
<label for="yourcomments">Comments (optional)<textarea name="yourcomments" id="yourcomments"><%=yourcomments%></textarea></label>
<legend>
<p>In order to help prevent Spam please type the answer to the following question, <span class="LV_invalid">"What is another name for frozen rain?"</span> in the &quot;Captcha&quot; box below.</p>
</legend>				
<label for="txtcaptcha">Captcha<input id="txtCaptcha" name="txtCaptcha" type="text" value="<%=txtCaptcha%>" /></label>
<script type="text/javascript">
var txtCaptcha = new LiveValidation('txtCaptcha');
txtCaptcha.add(Validate.Presence);
txtCaptcha.add( Validate.Inclusion, { within: [ 'snow' , 'ice', 'sleet', 'hail', 'frost', 'icicle', 'icicles', 'rime', 'hielo', 'slush' ] } );
</script>
<input name="submit" type="submit" id="submit" value="Send" />
</fieldset>
<input type="hidden" value="SubmitEmail" name="formAction" />
</form>
<%end select%>
 
<%
Select Case formAction
Case "SubmitEmail"
selectedsubject=Trim(Replace(request.form("selectedsubject"),"'","&#39;"))
yourname=Trim(Replace(request.form("yourname"),"'","&#39;"))
youremail=Trim(Replace(request.form("youremail"),"'","&#39;"))
yourcomments=Trim(Replace(request.form("yourcomments"),"'","&#39;"))
 
'This sends and email to you  
Dim str
str = "Information Request from YourSiteName.com" & vbCrLf & vbCrLf
str = str & "Contact information From: " & vbCrLf
str = str &  "Name: " & yourname & vbCrLf
str = str &  "mailto:" & youremail & vbCrLf
str = str &  "Subject:" & selectedsubject & vbCrLf
str = str &  "Comments:" & yourcomments & vbCrLf
Dim myMail 
Set myMail = Server.CreateObject("SMTPsvg.Mailer")
myMail2.Fields.Item(sUrl & "sendusername") = "support@example.com"
myMail2.Fields.Item(sUrl & "sendpassword") = "example-pass"
'change the following to your own mail host and email name and email address 
myMail.RemoteHost = "mail.example.com"
myMail.FromAddress = "crb@example.com"
myMail.AddRecipient "yourname", "youremail@YourSiteName.com"
myMail.Subject =  selectedsubject
myMail.BodyText = str
on error resume next
myMail.SendMail
if err.number <> 0 then
response.write "Error number " & err.number & " Error Desc " & err.description
err.clear
end if
on error goto 0 
Set myMail = Nothing
 
'This sends an eMail to the user who filled out the form
Dim str2
str2 = "Thank you for  your request for information from YourSiteName.com" & vbCrLf & vbCrLf
str2 = str2 &  "Here is the information you provided:" & vbCrLf & vbCrLf
str2 = str2 &  "Name: " & yourname & vbCrLf
str2 = str2 &  "email: " & youremail & vbCrLf 
str2 = str2 &  "Subject:" & selectedsubject & vbCrLf
str2 = str2 &  "Comments:" & yourcomments & vbCrLf 
str2 = str2 &  "You will be contacted within 24 hours of the eMail being processed by our staff." & vbCrLf & vbCrLf
str2 = str2 &  "Sincerely," & vbCrLf & vbCrLf
str2 = str2 &  "Your Name" & vbCrLf 
str2 = str2 &  "Your Company" & vbCrLf 
str2 = str2 &  "Your Phone" & vbCrLf 
str2 = str2 &  "On the web at: http://www.milehighmerchantaccounts.com/" 
Dim myMail2 
Set myMail2 = Server.CreateObject("SMTPsvg.Mailer")
'change the following to your own mail host and email name and email address 
myMail2.Fields.Item(sUrl & "sendusername") = "support@example.com"
myMail2.Fields.Item(sUrl & "sendpassword") = "example-pass"
myMail2.AddRecipient yourname, youremail
myMail2.Subject = "Thank you"
myMail2.BodyText = str2
on error resume next
myMail2.SendMail
if err.number <> 0 then
response.write "Error number " & err.number & " Error Desc " & err.description
err.clear
end if
on error goto 0 
Set myMail2 = Nothing
%>
<div id="thanks">
Thank you, your request and comments were sent at <%=now()%>.<br /><br />
Here is the information you provided:<br />
Name: <%=yourname%><br /> 
email: <%=youremail%><br />
Subject: <%=selectedsubject%><br />
Comments:  <%=yourcomments%> <br /><br />
<strong>You will be contacted within 24 hours of the eMail being processed by our staff.</strong><br />
<br />
Sincerely,<br />
Your Name<br />
Your Company<br />
Your Phone<br /><br />
</div>
<%end select%>
 
 
			</div> <!-- /pad -->
			</div> <!-- /pri -->
		<div id="sec"><!--#INCLUDE FILE="includes/nav.html" --></div> <!-- /sec -->
		<div id="ter">
 
 
		<!--#INCLUDE FILE="includes/sidenotes.html" -->
		</div> <!-- /ter -->
	</div> <!-- /wrap -->
	<div id="ft"><!--#INCLUDE FILE="includes/footer.html" -->
	</div> <!-- /ft -->
</body>
</html>
[+][-]07/20/09 07:46 PM, ID: 24901022Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/21/09 01:27 PM, ID: 24908973Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/21/09 02:14 PM, ID: 24909421Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Active Server Pages (ASP), Web Languages/Standards, Cascading Style Sheets (CSS)
Sign Up Now!
Solution Provided By: rcmb
Participating Experts: 1
Solution Grade: A
 
[+][-]08/07/09 02:32 PM, ID: 25047127Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625