Forums

ASP

This topic is locked

Smart Mailer ASP problem with email form

Posted 20 Sep 2004 15:52:53
1
has voted
20 Sep 2004 15:52:53 James Noon posted:
Hi

I have a page with a form that inserts various fileds into the database. I am having trouble with the smart mail content area. I basically need to enter the name of the field and then what they put in the form field, row after row.

Here is the code which doesnt work, please advise as to what I am doing wrong.

<%
' Smart Mailer 1.0.5
' Send on submit of form form2
if Request.ServerVariables("REQUEST_METHOD" = "POST" then
Server.ScriptTimeout = 300
Set sm1 = new SmartMailer
sm1.checkVersion "1.05"
sm1.contentCharset = "us-ascii"
Session.CodePage = sm1.getCodepage()
sm1.smtpSetup "localhost", "25", "", ""
sm1.pickup = ""
sm1.component = "aspemail"
sm1.tmpFolder = ""
sm1.embedImages = false
sm1.progressBar = ""
sm1.ignore_errors = true
sm1.useQueue = false
sm1.setFrom "James Noon", " "
sm1.setTo "Steve Blacup", " "
sm1.setCc "", ""
sm1.setBcc "", ""
sm1.Subject = "Blacup Training online application form"
' using static for body
sm1.setBody_Static_html "" & (Request.Form("username") & "
" & (Request.Form("password") & ""
' Attachments none
sm1.sendMail "one"
Response.Redirect "thankyou.asp"
end if
SM_mailAction = getMailAction()
%>


The page displays this error

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/online_application.asp, line 148

sm1.setBody_Static_html "" & (Request.Form("username") & "
-----------------------------------------------------------^

Replies

Replied 20 Sep 2006 15:11:43
20 Sep 2006 15:11:43 Russell Marshall replied:
I am having the same problem. Did you sort this out.

Russell

Reply to this topic