Forum Moderators: open
I know you experienced gurus will cringe, but, i used frontpage and created an email form: here's the code:
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="<%=request.form("mgremail")%>" B-Email-Label-Fields="TRUE"
B-Email-Subject-From-Field="FALSE"
S-Email-Subject="Your Employee has started the New Hire Orientation Process"
S-Builtin-Fields S-Form-Fields="fname lname mgremail "
U-Confirmation-Url="confirm.htm" -->
Thanks so much! I really need this help to finish a project.
The <%=...%> is shorthand for response.write. You could create a variable for the email address and then call the variable in the body. So, above your all your html you could put:
<%@ Language=VBScript %>
<% option explicit %><%
Dim email
email = Request.Form("mgremail")%>
And then use <%=email %> instead of what you currently have in the body of the page.
You will also need to save your page as a .asp page.
<edit>Code error fixed</edit>
[edited by: BlobFisk at 4:37 pm (utc) on April 11, 2003]
I have decided to try this instead.. but it's still not working - not sending the mail nor am i getting either the success or failed message.
<%
Dim blnMailSuccess
Set MyMail = Server.CreateObject("eArchNonConfig.SendMail")
If err.number <> 0 Then
Call HandleError()
End If
Response.Write Request("SendTo")
Response.Write Request("SendFrom")
Response.Write Request("SendCC")
Response.Write Request("SendBCC")
Response.Write Request("Subject")
Response.Write Request("BodyText")
Response.end
blnMailSuccess = MyMail.SendMail(Request("SendTo"), Request("SendFrom"), Request("SendCC"), Request("SendBCC"), Request("Subject"), Request("BodyText"))
Set MyMail = Nothing
If err.number <> 0 Then
Call HandleError()
End If
If blnMailSuccess = True Then
Response.Write ("Your Mail Has Been Sent")
Response.End
End If
Sub HandleError()
If blnMailSuccess = False Then
Response.Write ("Email has failed")
End If
End Sub
%>
any ideas?