Após terminar o procedimento dos recordsets no form, ele funciona perfeitametne no site, e cadastra os dados no banco de dados, porém, nenhum email é enviado - nem para mim nem para a pessoa que envia o form..
Onde esta errado?
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
Pergunta
Guest Ana Maria Xavier
Após terminar o procedimento dos recordsets no form, ele funciona perfeitametne no site, e cadastra os dados no banco de dados, porém, nenhum email é enviado - nem para mim nem para a pessoa que envia o form..
Onde esta errado?
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Dim ip
ip = Request.ServerVariables("REMOTE_ADDR")
Dim strFrom, strTo, strBody, strSubject, objMail
strFrom = Request.Form("FirstName")
strTo = "webmaster@portaldabya.com.br"
StrSubject = "Online Form Submission"
strBody = "The following info has been submitted" & vbCrLf & vbCrLf &_
"First Name: " & Request.Form("FirstName") & vbCrLf &_
"Last Name: " & Request.Form("LastName") & vbCrLf &_
"Email: " & Request.Form("Email") & vbCrLf &_
"State: " & Request.Form("State") & vbCrLf &_
"City: " & Request.Form("City") & vbCrLf &_
"IP do remetente:" & ip
"Be sure to check the online backside"
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
With iMsg
.From = strFrom
.To = strTo
.Subject = strSubject
.TextBody = strBody
.Send
End With
Set iMsg = Nothing
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.