Forums
This topic is locked
Smart Mailer ASP
Posted 22 Mar 2009 13:06:24
1
has voted
22 Mar 2009 13:06:24 Russell Marshall posted:
I have a page with three forms on it. See here: www.davrus.net/index2.aspUnfortunately when I submit any of the three forms the code actions the first sm3 routine and not the correct one for the particular form submitted.
The Smart Mailer ASP code for the email sending for the 3 forms is below.
Anyone any ideas. ???
Thanks
Davrus
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<!--#include file="ScriptLibrary/incSmartMailer.asp" -->
<%
' Smart Mailer 1.0.8
' Send on submit of form leftform
if Request.ServerVariables("REQUEST_METHOD" = "POST" then
Server.ScriptTimeout = 300
Set sm3 = new SmartMailer
sm3.checkVersion "1.08"
sm3.contentCharset = "utf-8"
Session.CodePage = sm3.getCodepage()
sm3.smtpSetup "", "", "", ""
sm3.pickup = ""
sm3.component = "cdonts"
sm3.tmpFolder = ""
sm3.embedImages = false
sm3.progressBar = ""
sm3.ignore_errors = true
sm3.useQueue = false
sm3.setFrom "Davrus Web Solutions", " "
sm3.setTo cStr(Request.Form("firstname"), cStr(Request.Form("email3")
sm3.setCc "Accounts", " "
sm3.setBcc "", ""
sm3.Subject = "10 things you need to know before buying a web site."
' using static for body
sm3.setBody_Static_html "" & (cStr(Request.Form("firstname")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("lastname")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("email3")) & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & ""
' Attachments none
sm3.sendMail "one"
Response.Redirect "thanks3.asp"
end if
SM_mailAction = getMailAction()
%>
<%
' Smart Mailer 1.0.8
' Send on submit of form quotations2
if Request.ServerVariables("REQUEST_METHOD" = "POST" then
Server.ScriptTimeout = 300
Set sm2 = new SmartMailer
sm2.checkVersion "1.08"
sm2.contentCharset = "utf-8"
Session.CodePage = sm2.getCodepage()
sm2.smtpSetup "", "", "", ""
sm2.pickup = ""
sm2.component = "cdonts"
sm2.tmpFolder = ""
sm2.embedImages = false
sm2.progressBar = ""
sm2.ignore_errors = true
sm2.useQueue = false
sm2.setFrom "Davrus Web Solutions", " "
sm2.setTo cStr(Request.Form("name2"), cStr(Request.Form("email2")
sm2.setCc "Accounts", " "
sm2.setBcc "", ""
sm2.Subject = "Quotations for 2"
' using static for body
sm2.setBody_Static_html "" & (cStr(Request.Form("name2")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("email2")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("description2")) & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & "" & vbCRLF & ""
' Attachments none
sm2.sendMail "one"
Response.Redirect "thanks2.asp"
end if
SM_mailAction = getMailAction()
%>
<%
' Smart Mailer 1.0.8
' Send on submit of form quotation1
if Request.ServerVariables("REQUEST_METHOD" = "POST" then
Server.ScriptTimeout = 300
Set sm1 = new SmartMailer
sm1.checkVersion "1.08"
sm1.contentCharset = "utf-8"
Session.CodePage = sm1.getCodepage()
sm1.smtpSetup "", "", "", ""
sm1.pickup = ""
sm1.component = "cdonts"
sm1.tmpFolder = ""
sm1.embedImages = false
sm1.progressBar = ""
sm1.ignore_errors = true
sm1.useQueue = false
sm1.setFrom "Davrus Web Solutions", " "
sm1.setTo cStr(Request.Form("fname"), cStr(Request.Form("email")
sm1.setCc "Accounts", " "
sm1.setBcc "", ""
sm1.Subject = "Website Quotation"
' using static for body
sm1.setBody_Static_text "Dear " & (cStr(Request.Form("fname")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("email")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("tel")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("conme")) & "" & vbCRLF & "" & vbCRLF & "" & (cStr(Request.Form("details")) & ""
' Attachments none
sm1.sendMail "one"
Response.Redirect "thanks1.asp"
end if
SM_mailAction = getMailAction()
%>
Replies
Replied 23 May 2009 10:15:41
23 May 2009 10:15:41 Patrick Julicher replied:
Hi Russel,
Unfortunately the link you entered does not work. Therefor I can not see the rest of the page, especially your form. Could you post the correct link or the code for the Submit form? Patrick
Unfortunately the link you entered does not work. Therefor I can not see the rest of the page, especially your form. Could you post the correct link or the code for the Submit form? Patrick