Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting expected end of statement error

Status
Not open for further replies.

rrmcguire

Programmer
Oct 13, 2010
304
0
0
US
Im creating a form to email the results in dreamweaver with the below returning what would show in my text of my message, but its returning an 'expected end of statement' error on the first line:

.TextBody = "SMTP Relay Test Sent @ " & Now() &; vbCrLf & "Surname: " & Surname & vbCrLf & "First Name: " & FirstName & vbCrLf & "Email: " & Email & vbCrLf & "Message: " & Message

Im assuming its probably a punctuation issue but cannot see it, any ideas would be greatly appreciated

thanks
 
thanks...I got that resolved now when I submit my contact.htm form I receive the following

CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/contact_us.asp, line 63


On line 63 is .Send as part of the below:

With objMessage
.To = "< user@domain.com >"
.From = "< user@domain.com >"
.Subject = "Contact Info"
.TextBody = "SMTP Relay Test Send @ " & Now() & vbCrLf & "Surname: " & Surname & vbCrLf & "First Name: " & FirstName & vbCrLf & "Email: " & Email & vbCrLf & "Message: "& Message
.Send

End With


any help would be greatly appreciated
 
Like before, you are using HTML character entities (& < etc) in vbscript, which is not correct.

Try:
.To = "user@domain.com"
.From = "user@domain.com"

and if it still fails, check your mail settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top