Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2004, 07:00 AM
Authorized User
 
Join Date: Jul 2004
Posts: 16
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to meichmann Send a message via AIM to meichmann Send a message via Yahoo to meichmann
Default formatting an email with asp

Hello Everyone!
     I hope someone can help me. I am not to familiar with .ASP so that's why i am askng here. I am trying to format values from a form into an email message with .asp her is my form info:

<form name="form1" method="post" action="send.asp">
            <p align="right"><strong>Name:<input type="text" name="name">
                      <br>
    Address:<input type="text" name="address">
    <br>
    City, State,Zip:<input type="text" name="citystatezip">
    <br>
    Email Address:<input type="text" name="email">
            </strong></p>
            <p align="center"><strong> <br>
              </strong><strong> Enter your Message to us here:<br>
                  <textarea name="message" cols="50"></textarea>
            </strong></p>
            <p align="center"><strong>
              <input type="submit" name="Submit" value="Submit">
            </strong></p>
          </form>[/black]

and here is the asp to format it:

<%
Dim strBody
 strSubject = "Form Submission"

 strBody = strBody & "============================================= " & vbCrLf
 strBody = strBody & "Website Comments" & vbCrLf
 strBody = strBody & "============================================= " & vbCrLf & vbCrLf

 strBody = strBody & "Web Users Information:" & vbCrLf
 strBody = strBody & "Name: " & Request.Form("name") & vbCrLf
 strBody = strBody & "E-mail: " & Request.Form("address") & vbCrLf
 strBody = strBody & "Address: " & Request.Form("citystatezip") & vbCrLf
 strBody = strBody & "City: " & Request.Form("email") & vbCrLf


 strBody = strBody & "Web Visitors Inquiry:" & vbCrLf
 strBody = strBody & Request.Form("message") & vbCrLf

 strBody = strBody & "End of users comments." & vbCrLf & vbCrLf

 strBody = strBody & "============================================= " & vbCrLf
 strBody = strBody & "End of E-mail" & vbCrLf
 strBody = strBody & "============================================= " & vbCrLf

Set objMail = CreateObject("CDONTS.NewMail")

objMail.From = Request.Form("Email")
objMail.To = "[email protected]"
objMail.Subject = strSubject
objMail.Body = strBody

objMail.Send

Set objMail = Nothing

Now, i do a "response.write(strbody)" and I get the proper values, but for some reason i am not getting the emails. am i doing something wrong?

thanks for your help!

Matt

 
Old July 15th, 2004, 08:10 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You need to configure SMTP to send mail.

Have u checked the settings done FOR SMTP?






Om Prakash
 
Old July 15th, 2004, 08:13 AM
Authorized User
 
Join Date: Jul 2004
Posts: 16
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to meichmann Send a message via AIM to meichmann Send a message via Yahoo to meichmann
Default

no i havent. i know that smtp is installed with the iis. we have iis 5.0 on the server...how do i go about checking this?

 
Old July 15th, 2004, 08:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't think it is installed along with IIS by default, I believe that is optional. If you have chosen not to install SMTP, still you can have IIS alone running.

Just check in your SERVICEs Console if SMTP service exists and shows up as STARTED. That is more than enough to verify if SMTP is installed in your system.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 15th, 2004, 08:39 AM
Authorized User
 
Join Date: Jul 2004
Posts: 16
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to meichmann Send a message via AIM to meichmann Send a message via Yahoo to meichmann
Default

I just checked my serivces and smtp isn't listed...ill ahve to install the smtp then see what happens...

 
Old July 15th, 2004, 09:05 AM
Authorized User
 
Join Date: Jul 2004
Posts: 16
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to meichmann Send a message via AIM to meichmann Send a message via Yahoo to meichmann
Default

ok, i got the smtp on the machine....

 
Old July 16th, 2004, 12:42 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear Vijay G do you know from where I can down load SMTP and install on my machine ?

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
 
Old July 17th, 2004, 09:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Numan,

Hope you are refering to Microsoft's SMTP service. It comes along with the Operating System CDs(win2000). I don't think MS allows free download of that from microsoft site. Maybe you can do a search in MS site.

But if you are refering to third party SMTP server, I am not sure how reliable they are. Still you can do a search on the net for that too.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 18th, 2004, 04:08 PM
Authorized User
 
Join Date: Jul 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by qazi_nomi
 Dear Vijay G do you know from where I can down load SMTP and install on my machine ?

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
The SMTP Service is a part of IIS with Server or Pro
Open "Add/Remove Programs"
Select Add/Remove Windows Components
Select Internet Information services
Click "Details"
Check SMTP Service
Complete the installation.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Formatting oystagoymp C# 1 February 14th, 2007 05:11 PM
Formatting Body of Email murfinp General .NET 0 August 18th, 2006 05:44 AM
table formatting in asp.net balesh ASP.NET 1.0 and 1.1 Basics 1 June 8th, 2006 07:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.