473,378 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

VBScript compilation error '800a0401'

1
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forms/lgctest.asp, line 17

Expand|Select|Wrap|Line Numbers
  1. Dim name,municipal position,municipality,address,city,state,zip,email
  2.  
  3. here's my code
  4.  
  5. <%@LANGUAGE= "VBSCRIPT"%>
  6. <%Option Explicit%>
  7. <html>
  8. <body>
  9.  
  10. <%
  11.  
  12. 'NOTE: YOU MUST UPDATE THE FOLLOWING 3 VARIABLES
  13. Dim strMailDomain, strMailUserName, strMailPassword
  14.  
  15. strMailDomain = "mail.southerntierwest.org"
  16. strMailUserName = "sphearsdorf@southerntierwest.org"
  17. strMailPassword = "phearsdorf"
  18.  
  19.  
  20. ' Get the form data from HTML form with 8 fields
  21. Dim name,municipal position,municipality,address,city,state,zip,email
  22.  
  23. name= Request.Form("txt_name")
  24. name= Request.Form("txt_municipal position")
  25. name= Request.Form("txt_municipality")
  26. name= Request.Form("txt_address")
  27. name= Request.Form("txt_city")
  28. name= Request.Form("txt_state")
  29. name= Request.Form("txt_zip")
  30. name= Request.Form("txt_email")
  31.  
  32.  
  33. ' Create the JMail message Object
  34. Dim msg
  35. set msg = Server.CreateOBject( "JMail.Message" )
  36.  
  37.  
  38. ' Enter the sender data
  39. msg.From = senderEmail
  40. msg.FromName = name
  41.  
  42. 'Server Authentication
  43. msg.MailServerUserName = strMailUserName
  44. msg.MailServerPassWord = strMailPassword
  45.  
  46.  
  47.  
  48. ' Note that as addRecipient is method and not
  49. ' a property, we do not use an equals ( = ) sign
  50. msg.AddRecipient "sphearsdorf@southerntierwest.org"
  51.  
  52. ' The subject of the message
  53. msg.Subject = subject
  54.  
  55. ' And the body
  56. msg.body = body
  57.  
  58.  
  59.  
  60. ' Now send the message, using the indicated mailserver
  61. if not msg.Send(strMailDomain) then
  62. Response.write "<pre>" & msg.log & "</pre>"
  63. else
  64. Response.write "Change this content to your own thank you message: Thank you for taking the time to contact us. We will review your request as soon as possible and reply accordingly"
  65. end if
  66.  
  67.  
  68. ' That's it - you can add additional e-mail addresses as required.
  69.  
  70.  
  71. %>
Mar 5 '10 #1
2 2987
tlhintoq
3,525 Expert 2GB
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Mar 5 '10 #2
sashi
1,754 Expert 1GB
Hi Sarah,

Kindly refer to below modified section. Hope it helps :)

Expand|Select|Wrap|Line Numbers
  1.   msg.AddRecipient("sphearsdorf@southerntierwest.org")
  2.  
Mar 7 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matthew Louden | last post by:
I have no idea what's wrong with the following ASP statement: Response.Write "<select name=\"id\">" MS VBScript Compilation error 800a0401 expected end of statement However, if I do the...
3
by: Matt | last post by:
When the ASP statement end with a _ character, then the next line cannot have comment ' character. Is that correct? Since I encountered the following error: Microsoft VBScript compilation...
0
by: John C | last post by:
Had an error message appear quite suddenly Friday evening/Saturday morning without any updating of our ASP application. Here is the technical setup W2K Adv IIS5 server, ~ 400 sites, dual 1ghz,...
6
by: Adam Short | last post by:
Can anyone help? I have all of a sudden started to receive this error on my site! I have no idea what script it is executing, why it is now failing, what is going on?? All I have been able...
1
by: aklsdjfh | last post by:
I'm no expert in asp and vbscript but not a total beginner. I've got some VBScript in an asp page which is generating a forumla for use in Lotus Notes replication. The line that it is objecting...
1
by: JNariss | last post by:
Hello, I have created a connection to my Access database with Dreamweaver and made a simple form with 4 fields. The code behind this form was/is: <%@LANGUAGE="VBCRIPT" CODEPAGE="1252"%>...
11
by: remya1000 | last post by:
While running the program, i'm getting this error Microsoft VBScript compilation error '800a0401' Expected end of statement /admin/currentmonth.asp, line 26 strSQL = "SELECT...
5
by: char | last post by:
I can't figure out why I am getting error: Microsoft VBScript compilation '800a0400' SET MyRecordSet = SERVER.CREATEOBJECT("ADODB.RECORDSET") MySQL = "SELECT * FROM ShipSummary (NOLOCK) where...
8
by: Charmie1701 | last post by:
Can anyone help...? I keep getting this error message and am now getting angry. I have checked my syntax hundreds of times and can not seem to find anything wrong with it....I think I need a fresh...
2
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.