Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPMail Problem (FromAddress) 1

Status
Not open for further replies.

Jeremy74

IS-IT--Management
Nov 21, 2001
56
GB
I have built a website in DreamweaverMX. The site requires users to join up using a form I created. Once the form is submitted the user gets taken to a detail page which displays the users information. This is where I have placed this code.

<%
fromName=&quot;b**f.com&quot;
fromAddress=&quot;jeremy@b**f.com&quot;
toName=&quot;jeremy&quot;
toAddress=&quot;jwie@yahoo.com&quot;
subject=&quot;test&quot;
relay=&quot;1**.168.1.7&quot;
%>

Also in here is 7 hidden fields to format data.

Once the form is submitted it goes to the process form page and I get the “fromaddress error”

It seems to work okay when I use the example in the tutorial I am using. But when I take the code out and place it on my form theirs this problem.

I am using this tutorial ( but pulling the information from the session.

What I am looking to do is populate an email with username and password and send the information to the user and a copy to me.

Am I barking up the wrong tree? if so can someone point me in the right direction.

Cheers

Jeremy
 
Could you display your code and the actual error you are receiving? It may have to do with the data that is being set into the fromAddress field, or it's possible it's completely unrelated to that line and only realizes that an error has occurred by the time it gets there and the real error is several lines higher.
-Tarwn &quot;Customer Support is an art not a service&quot; - marketing saying
&quot;So are most other forms of torture&quot; - programmers response
(The Wiz Biz - Rick Cook)
 
Doh

How silly do I feel, I had created a link that went to the process page but did not submit the data.
Okay thats that problem sorted. What I am looking to do now is send this email to a client and a CC to me. This obviously means I have to Change the following.

<%
fromName=&quot;b**f.com&quot;
fromAddress=&quot;jeremy@b**f.com&quot;
toName=&quot;jeremy&quot;
toAddress=&quot;jwie@yahoo.com&quot;***************************
subject=&quot;test&quot;
relay=&quot;1**.168.1.7&quot;
%>


How do I get the email address from a form to here/
Cheers

Jeremy
 
If the email address is in a text input on the previous page and your doing a form POST to the current page than all you need to do is get the value out by using Request.Form(&quot;nameOfYourTextField&quot;)
-Tarwn &quot;Customer Support is an art not a service&quot; - marketing saying
&quot;So are most other forms of torture&quot; - programmers response
(The Wiz Biz - Rick Cook)
 
Do I put the request.form something like this.

<%
fromName=&quot;Bphf.com&quot;
fromAddress=&quot;info@bphf.com&quot;
toName=&quot;jeremy&quot;
toAddress=Request.Form(&quot;email&quot;)
subject=&quot;your subject&quot;
relay=&quot;192.168.1.7&quot;
%>
 
Yes..


Wow! That was the shortest post I have ever done! :p

Cheers,

Gorkem.
 
No its not working :(

mail was not sent successfully
At least one Recipient, CC or BCC must be entered


 
make sure you have your Form field spelt correctly. If it doesn't match, it won't work.. if it still doesn't work, try just using REQUEST(&quot;Email&quot;)

After the form is submitted, and the 2nd page loads, you aren't loading a 3rd page to send the email are you? if so, this is where your problem is, if you aren't passing the values over to the 3rd page.

Cheers,

Gorkem.

 
Details1.asp

********************************************************
<%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;1252&quot;%>
<!--#include file=&quot;Connections/BPHF.asp&quot; -->

<%
fromName=&quot;Bphf.com&quot;
fromAddress=&quot;info@bphf.com&quot;
toName=&quot;jeremy&quot;
toAddress=Request.Form(&quot;email&quot;)
subject=&quot;BPHF Membership&quot;
relay=&quot;192.168.1.7&quot;
%>

<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=&quot;&quot;
MM_authFailedURL=&quot;fail.asp&quot;
MM_grantAccess=false
If Session(&quot;MM_Username&quot;) <> &quot;&quot; Then
If (true Or CStr(Session(&quot;MM_UserAuthorization&quot;))=&quot;&quot;) Or _
(InStr(1,MM_authorizedUsers,Session(&quot;MM_UserAuthorization&quot;))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = &quot;?&quot;
If (InStr(1,MM_authFailedURL,&quot;?&quot;) >= 1) Then MM_qsChar = &quot;&&quot;
MM_referrer = Request.ServerVariables(&quot;URL&quot;)
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & &quot;?&quot; & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & &quot;accessdenied=&quot; & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Recordset1.ActiveConnection = MM_BPHF_STRING
Recordset1.Source = &quot;SELECT * FROM BPHF&quot;
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim session1__MMColParam
session1__MMColParam = &quot;1&quot;
If (Session(&quot;MM_Username&quot;) <> &quot;&quot;) Then
session1__MMColParam = Session(&quot;MM_Username&quot;)
End If
%>
<%
Dim session1
Dim session1_numRows

Set session1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
session1.ActiveConnection = MM_BPHF_STRING
session1.Source = &quot;SELECT * FROM BPHF WHERE firstname = '&quot; + Replace(session1__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;'&quot;
session1.CursorType = 0
session1.CursorLocation = 2
session1.LockType = 1
session1.Open()

session1_numRows = 0
%>
<html>
<head>
<!-- TemplateBeginEditable name=&quot;doctitle&quot; -->
<title>Busy People Having Fun</title>
<!-- TemplateEndEditable -->
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;JavaScript&quot;>
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==&quot;Netscape&quot;)&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf(&quot;#&quot;)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
if (val) { nm=val.name; if ((val=val.value)!=&quot;&quot;) {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}

function YY_checkform() { //v4.65
//copyright (c)1998,2002 Yaromat.com
var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
for (var i=1; i<args.length;i=i+4){
if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
var myObj = MM_findObj(args.replace(/\[\d+\]/ig,&quot;&quot;));
myV=myObj.value;
if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
if (myReq&&myObj.value.length==0){addErr=true}
if ((myV.length>0)&&(args[i+2]==1)){ //fromto
var myMa=args[i+1].split('_');if(isNaN(parseInt(myV))||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
} else if ((myV.length>0)&&(args[i+2]==2)){
var rx=new RegExp(&quot;^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$&quot;);if(!rx.test(myV))addErr=true;
} else if ((myV.length>0)&&(args[i+2]==3)){ // date
var myMa=args[i+1].split(&quot;#&quot;); var myAt=myV.match(myMa[0]);
if(myAt){
var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
var myDate=new Date(myY,myM,myD);
if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
}else{addErr=true}
} else if ((myV.length>0)&&(args[i+2]==4)){ // time
var myMa=args[i+1].split(&quot;#&quot;); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
} else if (myV.length>0&&args[i+2]==5){ // check this 2
var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,&quot;&quot;));
if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,&quot;&quot;)];
if(!myObj1.checked){addErr=true}
} else if (myV.length>0&&args[i+2]==6){ // the same
var myObj1 = MM_findObj(args[i+1]);
if(myV!=myObj1.value){addErr=true}
}
} else
if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
var myTest = args.match(/(.*)\[(\d+)\].*/i);
var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
if (args[i+2]==2){
var myDot=false;
for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
if(!myDot){myErr+='* ' +args[i+3]+'\n'}
}
} else if (myObj.type=='checkbox'){
if(args[i+2]==1&&myObj.checked==false){addErr=true}
if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
} else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
}else if (myObj.type=='textarea'){
if(myV.length<args[i+1]){addErr=true}
}
if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
}
if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
document.MM_returnValue = (myErr=='');
}

function AddToFaves_hp(){
var is_4up = parseInt(navigator.appVersion);
var is_mac = navigator.userAgent.toLowerCase().indexOf(&quot;mac&quot;)!=-1;
var is_ie = navigator.userAgent.toLowerCase().indexOf(&quot;msie&quot;)!=-1;
var thePage = location.href;
if (thePage.lastIndexOf('#')!=-1)
thePage = thePage.substring(0,thePage.lastIndexOf('#'));
if (is_ie && is_4up && !is_mac)
window.external.AddFavorite(thePage,document.title);
else if (is_ie || document.images)
booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60');
//booker_hp.focus();
}
//-->
</script>
<link rel=&quot;stylesheet&quot; href=&quot;sheet1&quot; type=&quot;text/css&quot;>
<!-- TemplateBeginEditable name=&quot;head&quot; --><!-- TemplateEndEditable --> <!-- TemplateParam name=&quot;width&quot; type=&quot;text&quot; value=&quot;100%&quot; -->
<link href=&quot;sheet1&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
<link href=&quot;sheet1&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; onLoad=&quot;MM_preloadImages('gfx/paboutd.gif','gfx/peventd.gif','gfx/pchatd.gif','gfx/pcontd.gif')&quot;>
<table width=&quot;777&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;topbuttons&quot;>
<!--DWLayoutTable-->
<tr>
<td height=&quot;43&quot; colspan=&quot;2&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr align=&quot;right&quot;>
<td height=&quot;17&quot; colspan=&quot;2&quot; valign=&quot;top&quot;><a href=&quot;default.asp&quot; class=&quot;topbuttons&quot;>Home</a>
<font color=&quot;#D60270&quot; size=&quot;1&quot;>|</font> <a href=&quot;Login.asp&quot; class=&quot;topbuttons&quot;>Login</a>
<font color=&quot;#D60270&quot; size=&quot;1&quot;>|</font> <a href=&quot;#&quot; class=&quot;topbuttons&quot; onClick=&quot;AddToFaves_hp()&quot;>Bookmark
Us</a> <font color=&quot;#D60270&quot; size=&quot;1&quot;>|</font> <a href=&quot;mailto:?Subject=Check%20this%20cool%20site&CC=&BCC=&Body=Do%20you%20fancy%20going%20to%20one%20of%20the%20events?%20 class=&quot;topbuttons&quot;>Tell
a Friend</a> <font color=&quot;#D60270&quot; size=&quot;1&quot;>|</font> <a href=&quot;join.asp&quot; class=&quot;topbuttons&quot;>Join
Up!</a></td>
</tr>
<tr align=&quot;right&quot;>
<td height=&quot;445&quot; colspan=&quot;2&quot; valign=&quot;top&quot;><table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;360&quot; rowspan=&quot;3&quot; valign=&quot;top&quot;><p><font color=&quot;#FF0000&quot;>&nbsp;
<span class=&quot;toptext&quot;> Welcome:</span></font> <span class=&quot;toptext&quot;><%=(session1.Fields.Item(&quot;firstname&quot;).Value)%></span> </p>
<p class=&quot;BPHF&quot;>Please Check your details are correct.</p>
<form action=&quot;form_response.asp&quot; method=&quot;post&quot; name=&quot;form1&quot; onSubmit=&quot;YY_checkform('form1','firstname','#q','0','Field \'firstname\' is not valid.','sirname','#q','0','Field \'sirname\' is not valid.','email','S','2','Field \'email\' is not valid.','Password','#q','0','Field \'Password\' is not valid.','Password2','#Password','6','Field \'Password2\' is not valid.');return document.MM_returnValue&quot;>
<input type=&quot;hidden&quot; name=&quot;feedback&quot; value=&quot;:: Welcome to Busy People Having Fun ::&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-subject&quot; value=&quot;<%=subject%>&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-relay&quot; value=&quot;<%=relay%>&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-toaddress&quot; value=&quot;<%=toAddress%>&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-to&quot; value=&quot;<%=toName%>&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-fromAddress&quot; value=&quot;<%=fromAddress%>&quot;>
<input type=&quot;hidden&quot; name=&quot;mail-from&quot; value=&quot;<%=fromName%>&quot;>
<input name=&quot;firstname&quot; type=&quot;hidden&quot; id=&quot;firstname&quot; value=&quot;<%=(session1.Fields.Item(&quot;firstname&quot;).Value)%>&quot;>
<input name=&quot;email&quot; type=&quot;hidden&quot; id=&quot;email&quot; value=&quot;<%=(session1.Fields.Item(&quot;email&quot;).Value)%>&quot;>
<table align=&quot;center&quot;>
<!--DWLayoutTable-->
<tr valign=&quot;baseline&quot;>
<td width=&quot;122&quot; height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Title:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;title&quot;).Value)%> </td>
<td width=&quot;15&quot;></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Firstname:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;firstname&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Surname:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;sirname&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Email:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;email&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Company:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;company&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Position:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;position&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Address:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;address1&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Town:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;address2&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Region:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;address3&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Postcode:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;postcode&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Password:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;Password&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>*Repeat Password:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;Password&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Telephone:</td>
<td class=&quot;detailtxt&quot;><%=(session1.Fields.Item(&quot;telephone&quot;).Value)%> </td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;16&quot; align=&quot;right&quot; nowrap class=&quot;BPHF&quot;>&nbsp;&nbsp;Newsletter:</td>
<td class=&quot;detailtxt&quot;> <p class=&quot;maintxt&quot;><%=(session1.Fields.Item(&quot;Newsletter&quot;).Value)%></p></td>
<td></td>
</tr>
<tr valign=&quot;baseline&quot;>
<td height=&quot;20&quot; valign=&quot;top&quot; class=&quot;BPHF&quot;><a href=&quot;form_response.asp&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
<br>
Accept</a></td>
<td> <p class=&quot;BPHF&quot;><a href=&quot;edit.asp&quot;><br>
Edit</a></p></td>
<td></td>
</tr>
</table>
</form></td>
<td width=&quot;12&quot; rowspan=&quot;2&quot; align=&quot;center&quot; valign=&quot;middle&quot;><img src=&quot;gfx/pvertl.gif&quot; width=&quot;1&quot; height=&quot;218&quot;></td>
<td width=&quot;30&quot; rowspan=&quot;3&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
<td height=&quot;129&quot; colspan=&quot;2&quot; align=&quot;center&quot; valign=&quot;middle&quot;><img src=&quot;gfx/pleasecheck.gif&quot; width=&quot;199&quot; height=&quot;81&quot;></td>
<td width=&quot;4&quot;></td>
<td width=&quot;1&quot;></td>
</tr>
<tr>
<td width=&quot;29&quot; rowspan=&quot;2&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
<td colspan=&quot;2&quot; rowspan=&quot;2&quot; align=&quot;center&quot; valign=&quot;middle&quot;><img src=&quot;gfx/logo.gif&quot; width=&quot;460&quot; height=&quot;43&quot;><img src=&quot;gfx/camplady.gif&quot; width=&quot;73&quot; height=&quot;229&quot;></td>
<td height=&quot;177&quot;>&nbsp;</td>
</tr>
<tr>
<td height=&quot;139&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height=&quot;0&quot;></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height=&quot;1&quot;></td>
<td></td>
<td></td>
<td></td>
<td width=&quot;344&quot;></td>
<td></td>
<td></td>
</tr>
</table></td>
</tr>
<tr align=&quot;right&quot;>
<td height=&quot;25&quot; colspan=&quot;2&quot; valign=&quot;top&quot;> <table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; bgcolor=&quot;#E1396A&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;31&quot; height=&quot;5&quot;></td>
<td width=&quot;124&quot;></td>
<td width=&quot;77&quot;></td>
<td width=&quot;124&quot;></td>
<td width=&quot;73&quot;></td>
<td width=&quot;124&quot;></td>
<td width=&quot;64&quot;></td>
<td width=&quot;124&quot;></td>
<td width=&quot;36&quot;></td>
</tr>
<tr>
<td height=&quot;1&quot;></td>
<td></td>
<td></td>
<td rowspan=&quot;2&quot; valign=&quot;top&quot; align=&quot;center&quot;><a href=&quot;events.asp&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('pinkevents','','gfx/peventd.gif',1)&quot;><img src=&quot;gfx/peventu.GIF&quot; alt=&quot;Events&quot; name=&quot;pinkevents&quot; width=&quot;73&quot; height=&quot;14&quot; border=&quot;0&quot;></a></td>
<td></td>
<td rowspan=&quot;2&quot; valign=&quot;top&quot; align=&quot;center&quot;><a href=&quot;Chat.asp&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('chat','','gfx/pchatd.gif',1)&quot;><img src=&quot;gfx/pchatu.gif&quot; alt=&quot;Chat&quot; name=&quot;chat&quot; width=&quot;56&quot; height=&quot;14&quot; border=&quot;0&quot;></a></td>
<td></td>
<td rowspan=&quot;2&quot; valign=&quot;top&quot; align=&quot;center&quot;><a href=&quot;contact.asp&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('pinkcontact','','gfx/pcontd.gif',1)&quot;><img src=&quot;gfx/pcontu.gif&quot; alt=&quot;Contact Us&quot; name=&quot;pinkcontact&quot; width=&quot;124&quot; height=&quot;14&quot; border=&quot;0&quot;></a></td>
<td></td>
</tr>
<tr>
<td height=&quot;14&quot;></td>
<td valign=&quot;top&quot; align=&quot;center&quot;><a href=&quot;aboutus.asp&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('pinkabout','','gfx/paboutd.gif',1)&quot;><img src=&quot;gfx/paboutu.GIF&quot; alt=&quot;About Us&quot; name=&quot;pinkabout&quot; width=&quot;100&quot; height=&quot;14&quot; border=&quot;0&quot;></a></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height=&quot;5&quot;></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table></td>
</tr>
<tr align=&quot;right&quot;>
<td height=&quot;37&quot; colspan=&quot;2&quot; valign=&quot;top&quot;> <table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; bgcolor=&quot;#4DB5D8&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;777&quot; height=&quot;37&quot;></td>
</tr>
</table></td>
</tr>
<tr align=&quot;right&quot;>
<td width=&quot;535&quot; height=&quot;24&quot;></td>
<td width=&quot;242&quot; valign=&quot;top&quot;><table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;242&quot; height=&quot;24&quot; valign=&quot;top&quot; class=&quot;footertxt&quot;>&copy; 1999
- 2002 BPHF. <a href=&quot;#&quot;><font color=&quot;#D60270&quot;>Terms &amp; Conditions</font></a>.<br>
Please send comments to the <a href=&quot;Mailto:jeremy@e-lever.com&quot;><font color=&quot;#D60270&quot;>Webmaster</font></a>.</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
session1.Close()
Set session1 = Nothing
%>
*************************************





FORM_RESPONSE



<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<%
my_from=request(&quot;mail-fromName&quot;)
my_fromAddress=request(&quot;mail-fromaddress&quot;)
my_to=request(&quot;mail-toName&quot;)
my_toAddress=request(&quot;mail-toaddress&quot;)
my_subject=request(&quot;mail-subject&quot;)
my_relay=request(&quot;mail-relay&quot;)

Set Mailer = Server.CreateObject(&quot;SMTPsvg.Mailer&quot;)
Mailer.RemoteHost = my_relay

Mailer.FromName = my_from
Mailer.FromAddress = my_fromAddress
Mailer.AddRecipient my_to, my_toaddress
Mailer.Subject = my_subject

sBodyText = &quot;Welcome to Busy People Having Fun&quot; & vbcrlf & vbcrlf
sBodyText = sBodyText & &quot;Hello &quot; & request.form(&quot;firstname&quot;) & vbCrLf
sBodyText = sBodyText & &quot;Last Name: &quot; & request.form(&quot;sirname&quot;) & vbCrLf
sBodyText = sBodyText & &quot;Company: &quot; & request.form(&quot;company&quot;) & vbCrLf
sBodyText = sBodyText & &quot;Email Address: &quot; & request.form(&quot;email&quot;) & vbCrLf & Chr(13) & Chr(10) & Chr(13) & Chr(10)
sBodyText = sBodyText & &quot;&quot; & request.form(&quot;password&quot;) & vbCrLf
sBodyText = sBodyText & &quot;&quot; & request.form(&quot;telephone&quot;) & vbCrLf
Mailer.BodyText = sBodyText

If Mailer.SendMail then
Msg = &quot;Thank you for your enquiry.<br> A member of staff will contact you shortly.&quot;
Else
Msg = &quot;mail was not sent successfully<br>&quot;
msg = msg & mailer.response & &quot;<br>&quot;
End If

response.write Msg
%>
</body>
</html>
 
take out the - in your names. either that or you may have to escape or encode them.
then do this in the second page to test
response.write request(&quot;mailfromName&quot;)
response.write request(&quot;mailfromaddress&quot;)
response.write request(&quot;mailtoName&quot;)
response.write request(&quot;mailtoaddress&quot;)
response.write request(&quot;mailsubject&quot;)
response.write request(&quot;mailrelay&quot;)
for values being sent

admin@onpntwebdesigns.com
 
I havent taken the &quot;-&quot; out yet. But its sending the email address to the email okay.
I can't pull the info straight from the form I had to make hidden textfields like this.

<input name=&quot;email&quot; type=&quot;hidden&quot; id=&quot;email&quot; value=&quot;<%=(session1.Fields.Item(&quot;email&quot;).Value)%>&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top