salve attutti

premessa sto imparando (quindi non ridete se dico o chiedo assurdità )

1.ho una pagina ASP che elabora le variabile inviatele da un file swf che vengono scritte nel db...e fin qui tutto ok.
<%@LANGUAGE="VBSCRIPT"%>


<%
Dim nome, mail
nome= Request.Form("nome")
mail= Request.Form("mail")

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_STRING
Command1.CommandText = "INSERT INTO tabella (nome, mail) VALUES ('" & nome & "','" & mail & "')"

Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

Set Command1 = Nothing

%>


2.ho un altro file ASp che elabora le variabile inviatele da un file swf e invio con persits.mailsender e fin qui tutto ok

<%option explicit%>
<%
Dim objMail , strBody


Set objMail = Server.CreateObject("Persits.MailSender")
StrBody = "<HTML><HEAD><TITLE>EMAIL</TITLE></HEAD><BODY bgcolor=#ffffff>"
StrBody = StrBody + "<img src=logo.gif'>" & "

"
StrBody = StrBody + "<font face=Verdana size= 1 color= black>Il tuoi dati sono stati aggiunti alla nostra mailing list! :</FONT>
"
StrBody = StrBody + "<font face=Verdana size= 2 color= black>nome: <font face=Verdana size= 2 color= green>" & Request.Form("nome") &"</FONT>
"

StrBody = StrBody + "<font face=Verdana size= 2 color= black>mail: <font face=Verdana size= 2 color= red>" & Request.Form("mail") & "</FONT>
"


StrBody = StrBody + "</BODY></HTML>"


objMail.Host = "smtp.server.it"

objMail.From = "inini@hihih.it"


objMail.FromName = ""

objMail.AddAddress "" & Request.Form("mail") & ""
objMail.AddCC "inini@hihih.it"

objMail.Subject = "conferma"

objMail.Body = strBody
objMail.IsHTML = True

objMail.Send

Set objMail = Nothing
%>

il mio problema è che singolarmente le pagine fungono, ma vorrei concatenare i due eventi in un unica pagina ASP: prima scrivo nel db (code1) e se OK allora elaboro oggetto mail (code2) che invierà all'utente conferma.

ho provato con end if con senza <% e %>...nada

qualcuno mi dice dove sbaglio?

grazie