Trouble with ASP Email script

I have a Flash Form that transfers data to this ASP sript.  The ASP Script is supposed to email the information in this form to our receptionist.   I am currently using network solutions and I haven't been able to have this page email anyone.   Can someone help me, am I missing a syntax?    

I verified that all the fields are coming from the flash file, because I successfully created a page to return the variables on the screen.     Any help is appreciated.

The page is located at http://www.greenehazel.com/beta/formtest/contactusform.html and it seems that nothing happens...
<%
'      Create the email routine
Dim strTo, fromaddy, strSubject, strBody 'Strings for fromaddress
Dim cdoConfig, objMessage 'The CDO object 

sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration") 

With cdoConfig.Fields 
      .Item(sch & "sendusing") = 2 ' 2 if External, 1 if Internal
      .Item(sch & "smtpserver") = localhost ' Enter the mail server IP address here
      .Item(sch & "smtpserverport") = 25 ' Shouldn't have to change this
.update 
End With 

'First we'll read in the values entered 
fromaddy=request.form("email")
strSubject = "Contact Requested from Greene-Hazel.com Website"
strBody = ( "Name: " & Request.Form("name") & vbCrLf _
      & "Email: " & Request.Form("email") & vbCrLf _
      & "Phone: " & Request.Form("phone") & vbCrLf _
      & "Comments: " & Request.Form("desc") & vbCrLf)


' Create an instance of the NewMail object. 
Set objMessage = Server.CreateObject("CDO.Message") 
Set objMessage.Configuration = cdoConfig 

' Set the properties of the object 
objMessage.From = fromaddy ' The from address
objMessage.To = "earl.kelly@comcast.net" ' Your address
objMessage.Subject = strSubject
objMessage.HTMLBody = strBody

' Send the message! 
objMessage.Send 

' Set the object to nothing because it immediately becomes 
' invalid after calling the Send method. 
Set objMessage = Nothing
%>

Open in new window

<%
'      Create the email routine
Dim strTo, strFrom, strSubject, strBody 'Strings for fromaddress
Dim cdoConfig, objMessage 'The CDO object 

sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration") 

With cdoConfig.Fields 
      .Item(sch & "sendusing") = 1 ' 2 if External, 1 if Internal
      .Item(sch & "smtpserver") = localhost ' Enter the mail server IP address here
      .Item(sch & "smtpserverport") = 25 ' Shouldn't have to change this
.update 
End With 

'First we'll read in the values entered 
strFrom = request.form("email")
strSubject = "Contact Requested from Greene-Hazel.com Website"
strBody = ( "Name: " & Request.Form("name") & vbCrLf _
      & "Email: " & Request.Form("email") & vbCrLf _
      & "Phone: " & Request.Form("phone") & vbCrLf _
      & "Comments: " & Request.Form("desc") & vbCrLf)


' Create an instance of the NewMail object. 
Set objMessage = Server.CreateObject("CDO.Message") 
Set objMessage.Configuration = cdoConfig 

' Set the properties of the object 
objMessage.From = strFrom ' The from address
objMessage.To = "earl.kelly@comcast.net" ' Your address
objMessage.Subject = strSubject
objMessage.HTMLBody = strBody

' Send the message! 
objMessage.Send 

' Set the object to nothing because it immediately becomes 
' invalid after calling the Send method. 
Set objMessage = Nothing
%>

Open in new window

LVL 1
Earl KellyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne BarronAuthor, Web DeveloperCommented:
#1: Change the Font on that form, it is hard to read what you write.
#2: For something this simple, why are you using Flash? It is not really needed for this page.
#3: Your code is all messed up for using "Network Solutions" I know, that is who I use.

Please read the code below, add in your information such as:
Password.

Also, I already added in your site information where it needs to be at.
If Your have a Network Solutions Hosting Package for your companies site.
Then I strongly suggest that you go into the Mail portion of the site and set up some email accounts.
support
webmaster
admin
complaint
contact
sales

Then add in any additional accounts that are needed for your secretary, yourself and others that work for the company.

If you need any additional help or information about how to use the NS Hosting package, please feel free to ask away, I have been with them for 2 years with a hosting package and 9 years for hosting my domain names.

Carrzkiss

<% 
'      Create the email routine 
Dim strTo, strFrom, strSubject, strBody 'Strings for fromaddress 
Dim cdoConfig, objMessage 'The CDO object  
 
Set objMessage = CreateObject("CDO.Message")
'  http://www.greenehazel.com
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.greenehazel.com"
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
     
' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
' Go into your Network Solutions account and Create some Email Address's. Namely:
' webmaster, admin, support
' plus whatever else you are going to need for your site. Maybe one for yourname, your secretary and so forth.
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="webmaster@greenehazel.com"
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="PASSWORD GOES HERE"
 
 
'First we'll read in the values entered  
strFrom = request.form("email") 
strSubject = "Contact Requested from Greene-Hazel.com Website" 
strBody = ( "Name: " & Request.Form("name") & vbCrLf _ 
      & "Email: " & Request.Form("email") & vbCrLf _ 
      & "Phone: " & Request.Form("phone") & vbCrLf _ 
      & "Comments: " & Request.Form("desc") & vbCrLf) 
 
 
' Create an instance of the NewMail object.  

Set objMessage.Configuration = cdoConfig  
 
' Set the properties of the object  
objMessage.From = strFrom ' The from address 
objMessage.To = "earl.kelly@comcast.net" ' Your address 
objMessage.Subject = strSubject 
objMessage.HTMLBody = strBody 
 
' Send the message!  
objMessage.Send  
 
' Set the object to nothing because it immediately becomes  
' invalid after calling the Send method.  
Set objMessage = Nothing 
%>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Earl KellyAuthor Commented:
Thanks so much for your help!!
0
Wayne BarronAuthor, Web DeveloperCommented:
Not a problem.
Good luck with your site!

Carrzkiss
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.