Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 03-24-2006, 05:04 PM Form processing Help
Junior Talker

Posts: 2
Trades: 0
Hello

I am a thick newbie and cant beleive how difficult it is getting a simple form to work.

All I want is a general feedback form with name, email, feedback etc

I have looked at a few tutorials but none of them seem to work on my server. I have tried looking through the server FAQs and am getting nowhere.

There is this message on one of the faqs, i have a feeling I am missing something out of the script that is particular to the server but i just dont get it.

Warnings:

All the components use SMTP (Simple Mail Transfer Protocol), and you should be aware that all StreamlineNet' SMTP servers have filters which ensure that either the 'to' or 'from' address relates to one of your domains hosted by StreamlineNet, and that the 'from' address is not blank.


My domain is rpla.co.uk

lease could someone point me in the direction of an easy to understand tutorial or even write the scipt for me so i at least have a base to work from.

Please please please help its driving me nuts

Thanks in advance
QuizToon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-25-2006, 12:31 AM Re: Form processing Help
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
Check these out

http://www.4guysfromrolla.com/webtec...More/Email.asp
http://www.4guysfromrolla.com/webtech/112298-1.shtml
WebcyteDesign is offline
Reply With Quote
View Public Profile Visit WebcyteDesign's homepage!
 
Old 03-25-2006, 12:47 AM Re: Form processing Help
Super Talker

Posts: 144
Trades: 0
this is taken from a contact page I wrote a while back. I modified it just a bit as to what I thought you may desire for the process...

read the comments, you will NEED to know your Outgoing Mail Server (SMTP). Typically it's mail.yourdomain.com and if you don't know, contact your host or server administrator.

anyways, on with the show...

Code:
<%
  ' name this file as "send_feedback.asp"
 
  ' it will take what they input in the form and compose an email to the email
  ' address you specify on line 35, sendmail.to = "..."
  ' make sure you change SMTP (outgoing mail server) to the mail server which you use
  ' typically, it's "mail.domain.com" but if you don't know, contact your server administrator or
  ' web hosting customer support
 
  on error resume next
 
  dim sendmail_success
 
  sendmail_success = false
 
  if request.form("email") <> "" then
    dim iconf, flds, sendmail, bodymsg
 
    bodymsg = "Feedback from website:"& vbcrlf & vbcrlf
    bodymsg = bodymsg &"Full Name: "& request.form("full_name") & vbcrlf & vbcrlf
    bodymsg = bodymsg &"Email: "& request.form("email") & vbcrlf & vbcrlf & vbcrlf & vbcrlf
    bodymsg = bodymsg & request.form("message")
 
    set iconf = server.createObject("CDO.Configuration")
    set flds = iconf.fields
 
    flds("http://schemas.microsoft.com/cdo/con...tion/sendusing") = 2
 
    ' change this to point to YOUR OUTGOING MAIL SERVER instead of 'mail.server.com
    flds("http://schemas.microsoft.com/cdo/con...ion/smtpserver") = "mail.server.com"
 
    flds.update
 
    set sendmail = server.createObject("CDO.Message")
    set sendmail.configuration = iconf
 
    ' change this to point to your email address
    sendmail.to = "your@email.com"
 
    sendmail.from = request.form("email")
    sendmail.subject = request.form("subject")
    sendmail.textBody = bodymsg
    sendmail.send
 
    set sendmail = nothing
    set flds = nothing
    set iconf = nothing
 
    if err.number = 0 then
      sendmail_success = true
      response.write "<script language=""javascript"">alert(""Thank you, "& request.form("full_name") &"\n\nYour email has been sent"");</script>"
    else
      response.write "<script language=""javascript"">alert(""There was an error while sending your email, please try again later\n\nERROR: "& err.description &""");</script>"
    end if
  end if
%>
<b>Send Me Feedback!</b>
<table cellspacing="5" cellpadding="0" border="0">
  <form action="send_feedback.asp" method="POST">
  <tr style="padding-top:15px;">
    <td>Full Name:</td>
    <td>
      <input type="text" name="full_name" size="30" maxlength="150" <%
 if request.form("full_name") <> "" then
   response.write "value="""& request.form("full_name") &""""
 end if
      %>>
    </td>
  </tr>
  <tr>
    <td NOWRAP>Your Email Address:</td>
    <td>
      <input type="text" name="email" size="30" maxlength="150" <%
 if reqeust.form("email") <> "" then
   response.write "value="""& request.form("email") &""""
 end if
      %>>
    </td>
  </tr>
  <tr>
    <td>Subject:</td>
    <td>
      <input type="text" name="subject" size="30" maxlength="150" <%
 if request.form("subject") <> "" and not sendmail_success then
   response.write "value="""& request.form("subject") &""""
 end if
      %>>
    </td>
  </tr>
  <tr>
    <td colspan="2">
      Message:<br>
      <textarea name="message" rows="6" cols="40"><%
 if request.form("message") <> "" and not sendmail_success then
   response.write request.form("message")
 end if
      %></textarea>
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="submit" name="btnSubmit" value="send me feedback!">
    </td>
  </tr>
  </form>
</table>
__________________
create.vibe

Please login or register to view this content. Registration is FREE
createvibe.com is offline
Reply With Quote
View Public Profile Visit createvibe.com's homepage!
 
Reply     « Reply to Form processing Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17115 seconds with 12 queries