Smart Mailer ASP Support Product Page

This topic was archived

not passing variables

Asked 04 Oct 2003 20:38:58
1
has this question
04 Oct 2003 20:38:58 Rich Arcand posted:
I've read and tried the tutorials and I can't pass any variables - I also tried to get the user's first Name from the DB with no success.

Hello ##Request("(rsClub.Fields.Item(txtFirstName).Value)")##,


Does anyone know the correct way to get variables from a form or the DB

Replies

Replied 04 Oct 2003 21:07:22
04 Oct 2003 21:07:22 Rich Arcand replied:
Whoa, I fixed it myself...too many parens and quotes, this code worked.

Hello ##rsClub.Fields.Item("txtFirstName").Value##,

##Request.Form("txtNote")##


I'd like to include an asp file after this, anyone?
Replied 06 Oct 2003 02:34:50
06 Oct 2003 02:34:50 Rich Arcand replied:
OK I figured this out (I forgot to bind the form variables)...

George, Martha, what about sending other info...like a record set

##Request.QueryString("rsInfo")##


has anyone had any success???????
Replied 06 Oct 2003 09:12:01
06 Oct 2003 09:12:01 Martha Graham replied:
Check the tutorial on how to send mail from a recordset. You can find the tutorials under the help button of the UI.

Martha Graham
DMXzone manager
Replied 08 Oct 2003 18:07:52
08 Oct 2003 18:07:52 Rich Arcand replied:
I can send form data and I can send attachments - the product works great.

What I really want is to send a greeting (from a form) with a pre made attachment (asp file with recordsets, links) merged together as one nice email.
Replied 09 Oct 2003 13:15:23
09 Oct 2003 13:15:23 George Petrov replied:
Yes sure it is possible - just make a asp page that if executed in your browser contains the text for the mail you want send.

Then use this asp page as template.

You can specify url parameters - so the pages is customized per user.

Greetings,
George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------
Replied 09 Oct 2003 14:26:21
09 Oct 2003 14:26:21 Rich Arcand replied:
Hi,

I've tried but I must be missing a critical step somewhere. I have a form that passes the "greeting" variable to my ASP template page. But when I then open / execute the Smart Mailer page I get the attachment but it doesn't contain the greeting - just a blank input box...Could You or Martha write a tutorial.
Replied 09 Oct 2003 19:33:17
09 Oct 2003 19:33:17 George Petrov replied:
I asked Martha to write a tutorial about this indeed <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

So it should be coming up soon.

Greetings,
George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------
Replied 14 Oct 2003 16:36:17
14 Oct 2003 16:36:17 Victor Terblanche replied:
My template page contains recordsets that are filtered with values from sessions. These values are not passed and if I use the ##Session("value"##, I get syntax asp errors.
Replied 25 Apr 2004 02:13:41
25 Apr 2004 02:13:41 Pablo SanJuan replied:
Victor, do you solve the problem?
I´m making mi decision if buying this extension or not. so your opinion will be apreciated
Thanks

Replied 26 Apr 2004 15:17:44
26 Apr 2004 15:17:44 Rich Arcand replied:
Shaka,

the product works great.

Rich
Replied 04 Nov 2004 15:27:46
04 Nov 2004 15:27:46 CK Nyak replied:
No it doesn't! I still cannot pass variables such as querystring, session, cookies or form. I have tried to work around it without success...

Does any body know how the template can use these variables? That was the reason I purchased the product to send dynamic mail to a user after specific actions.
Replied 04 Feb 2005 06:43:31
04 Feb 2005 06:43:31 John Bendall replied:
Ditto Rene!
Purchased it for the same reason, just thought I would come back and see if anyone had resolved the problem or if anyone from DMXzone had bothered to explain how to do it.
Looks like nothing has changed here.
Pity, so much potential, so little support ....
John
Replied 17 Jul 2007 08:58:59
17 Jul 2007 08:58:59 Justin Moss replied:
I've developed a solution and posted it here:

"Smart Mailer - how to merge fields into template" www.dmxzone.com/forum/topic.asp?topic_id=39080&NewsId=5578

Best Wishes,
Justin
Replied 14 Apr 2009 20:37:08
14 Apr 2009 20:37:08 David Breschi replied:
i have this problem...

i have a page "product.asp" filtered by many parameters like this "product.asp?idArt=620&idCat=31".

in my db i have many item:
idArt 1 t-shirt
idArt 2 polo
idArt 3 cap
ect....

the client selected from page "catalog.asp" the item called cap, and he obtains this page "product.asp?idArt=3".
in this page there are one form for contacting me about price of this item selected.

This form provide to send me the request of price by client, but it doesn't pass me the QueryString variables.

Using ServerVariables URL i noted that the email sent, intead to have "product.asp?idArt=3" it has "product.asp" and it shows the name of first item registered in my db.

Which Have I to do to receive email filtered by idArt?

Replied 14 Apr 2009 20:49:06
14 Apr 2009 20:49:06 David Breschi replied:
this is my code

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/dbCatalogo.asp" -->
<!--#include file="ScriptLibrary/incSmartMailer.asp" -->
<
%' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
    MM_IIf = ifFalse
  Else
    MM_IIf = ifTrue
  End If
End Function
%>
<
%Dim rsCategoria
Dim rsCategoria_cmd
Dim rsCategoria_numRows

Set rsCategoria_cmd = Server.CreateObject ("ADODB.Command")
rsCategoria_cmd.ActiveConnection = MM_dbCatalogo_STRING
rsCategoria_cmd.CommandText = "SELECT idCat, categoria FROM categorie ORDER BY categoria ASC" 
rsCategoria_cmd.Prepared = true

Set rsCategoria = rsCategoria_cmd.Execute
rsCategoria_numRows = 0
%>
<
%Dim rsProdotto__MMColParam
rsProdotto__MMColParam = "1"
If (Request.QueryString("idArt") <> "") Then 
  rsProdotto__MMColParam = Request.QueryString("idArt")
End If
%>
<
%Dim rsProdotto
Dim rsProdotto_cmd
Dim rsProdotto_numRows

Set rsProdotto_cmd = Server.CreateObject ("ADODB.Command")
rsProdotto_cmd.ActiveConnection = MM_dbCatalogo_STRING
rsProdotto_cmd.CommandText = "SELECT articoli.idArt, articoli.codice, articoli.descrizione, articoli.misure, articoli.imballaggio, articoli.prezzo, articoli.immagine, articoli.idCat, categorie.idCat, categorie.categoria, articoli.dettagli, articoli.colori, articoli.hit FROM articoli INNER JOIN categorie ON articoli.idCat = categorie.idCat WHERE articoli.idArt = ?" 
rsProdotto_cmd.Prepared = true
rsProdotto_cmd.Parameters.Append rsProdotto_cmd.CreateParameter("param1", 5, 1, -1, rsProdotto__MMColParam) ' adDouble

Set rsProdotto = rsProdotto_cmd.Execute
rsProdotto_numRows = 0
%>
<
%' Smart Mailer 1.0.8
' Send on submit of form invio_preventivo
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 "xxxxxxxx", "", "xxxxxxxxxxx", "xxxxxxxxxx"
  sm1.pickup = ""
  sm1.component = "cdo"
  sm1.tmpFolder = ""
  sm1.embedImages = false
  sm1.progressBar = ""
  sm1.ignore_errors = false
  sm1.useQueue = false
  sm1.setFrom Request.Form("nome"), Request.Form("email")
  sm1.setTo "My Mail", "mymail@site.it"
  sm1.setCc "", ""
  sm1.setBcc "", ""
  sm1.Subject = "Invio preventivo per articolo: " & (rsProdotto.Fields.Item("descrizione").Value) & ""
  ' using static for body
  sm1.setBody_Static_html "E' stata ricevuta una richiesta di preventivo per il seguente articolo:" & vbCRLF & "" & vbCRLF & "codice: " & (rsProdotto.Fields.Item("codice").Value) & "" & vbCRLF & "descrizione: " & (rsProdotto.Fields.Item("descrizione").Value) & "" & vbCRLF & "link al catalogo: " & (Request.ServerVariables("URL")) & "" & vbCRLF & "categoria: " & (rsProdotto.Fields.Item("categoria").Value) & "" & vbCRLF & "dettagli prodotto: " & (rsProdotto.Fields.Item("dettagli").Value) & "" & vbCRLF & "" & vbCRLF & "da parte di:" & vbCRLF & "" & vbCRLF & "nome: " & (Request.Form("nome")) & "" & vbCRLF & "attivita: " & (Request.Form("attivita")) & "" & vbCRLF & "email: " & (Request.Form("email")) & "" & vbCRLF & "quantitativo richiesto: " & (Request.Form("quantita")) & "" & vbCRLF & "note:" & vbCRLF & "" & (Request.Form("note")) & ""
  ' Attachments none
  sm1.sendMail "one"
  Response.Redirect "conferma_preventivo.asp"
end if
SM_mailAction = getMailAction()
%>

Replied 15 Apr 2009 01:02:07
15 Apr 2009 01:02:07 Justin Moss replied:
It seems to me you are only missing a Move to Specific Record behaviour (for paramater idArt).

Replied 15 Apr 2009 17:18:50
15 Apr 2009 17:18:50 David Breschi replied:
QuoteIt seems to me you are only missing a Move to Specific Record behaviour (for paramater idArt).



can explain it better cause i don't understand


Reply to this topic