Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

zanelati2002

dados da busca via email

Recommended Posts

estou tentando mandar os dados do cadastro da busca para o cara acontece que o email chega mais os dados não olhem o codigo.

 

<!--#include file="common.inc" --><% 'Dimension variablesDim rsAddURL    'Recordset objectDim strInputTitle    'Holds the URL TitleDim strInputURL    'Holds the URLDim strInputDescription   'Holds the description of the URLDim strInputKeywords    'Holds the keywords for the URLDim saryDescriptionWord   'Array to hold each word in the description enetred by the userDim intCheckWordLengthLoopCounter 'Loop counterDim intWordLength   'Holds the length of the word to be checkedDim blnWordLenthOK   'Boolean set to False if any words in the description are above 30 charactersDim intLongestWordLength   'Holds the number of characters in the longest word entered in the descriptionDim blnNewURL    'set to false if the URL is already in the databaseDim strCategory    'CategoriaDim Objmail     'mailDim HTML      'HTML'Initialse variablesblnWordLenthOK = TrueblnNewURL = False'Read in user deatils from the add URL formstrInputTitle = Request.Form("title")strInputURL = Request.Form("url")strInputDescription = Request.Form("description")strInputKeywords = Request.Form("keywords")strCategory = Request.Form("category")'Where someones has pressed return in there description replace this with a space 'as otherwise the last word and first word on the line are seen as one word and may go over the 30 chraracter limitstrInputDescription = Replace(strInputDescription, vbCrLf, " ")'Split-up each word in the description from the user to check that no word entered is over 30 characterssaryDescriptionWord = Split(Trim(strInputDescription), " ")'Loop round to check that each word in the description entered by the user is not above the 30 charactersFor intCheckWordLengthLoopCounter = 0 To UBound(saryDescriptionWord)'Initialise the intWordLength variable with the length of the word to be searchedintWordLength = Len(saryDescriptionWord(intCheckWordLengthLoopCounter))'Get the number of characters in the longest wordIf intWordLength => intLongestWordLength Then  intLongestWordLength = intWordLengthEnd If 'If the word length to be searched is more than or equal to 30 then set the blnWordLegthOK to falseIf intWordLength => 30 Then  blnWordLenthOK = False   End IfNext'Get rid of scripting tagsstrInputTitle = Replace(strInputTitle, "<", "<")strInputTitle = Replace(strInputTitle, ">", ">")strInputDescription = Replace(strInputDescription, "<", "<")strInputDescription = Replace(strInputDescription, ">", ">")'If the user has entered no words over 30 characters then write to database If blnWordLenthOK = True Then'create a recordset objectSet rsAddURL = Server.CreateObject("ADODB.Recordset")'Initalise the strSQL variable with an SQL statement to get all the URLs from databasestrSQL = "SELECT tblWebsites.* FROM tblWebsites WHERE tblWebsites.URL = '" & strInputURL & "';"'Set the cursor type property of the record set to Dynamic so we can navigate through the record setrsAddURL.CursorType = 2'Set the Lock Type for the records so that the record set is only locked when it is updatedrsAddURL.LockType = 3  'Query the databasersAddURL.Open strSQL, adoCon'If there are no records returned by the recordset then it's a new URLIf rsAddURL.EOF Then   'Set the new URL booleon to True blnNewURL = True  'Tell the recordset this is a new record rsAddURL.AddNewEnd If'Place the users input in the recorsetrsAddURL.Fields("Title") = strInputTitlersAddURL.Fields("URL") = strInputURLrsAddURL.Fields("Description") = strInputDescriptionrsAddURL.Fields("Keywords") = strInputKeywordsrsAddURL.Fields("Date_Entered") = Now()rsAddURL.Fields("category") = strCategory'Update the databasersAddURL.Update'Close Sever Objects Set rsAddURL = NothingSet strCon = NothingSet adoCon = Nothing End If %><% 'Read in user deatils from the add URL formstrInputTitle = Request.Form("title")strInputURL = Request.Form("url")strInputDescription = Request.Form("description")strInputKeywords = Request.Form("keywords")strCategory = Request.Form("category")  Set ObjMail = Server.CreateObject("Cdonts.Newmail")  HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"  HTML = HTML & "<html>"  HTML = HTML & "<head>"   HTML = HTML & "</head>"  HTML = HTML & "<body bgcolor=""FFFFFF""><font face=verdana size=1>"  HTML = HTML & "Você acabou de Cadastrar o site & URL &<br><br><font face=verdana size=1>"  HTML = HTML & "Em nosso Sistema de Busca<br><font face=verdana size=1>"HTML = HTML & "Confira os dados do Cadastro.<br><br><font face=verdana size=1>"HTML = HTML & "Titulo: "&title&"<br>Site: "&url&"<br><br><font face=verdana size=1>"HTML = HTML & "Descrição: "&description&"<br>Palavra Chave: "&keywords&"<br><br><font face=verdana size=1>"HTML = HTML & "Data: "&date_entered&"<br>Categoria: "&category&"<br><br><font face=verdana size=1>"HTML = HTML & "Visite o Site: <a href=""www.sitedozanelati.com"">www.sitedozanelati.com</a><font face=verdana size=1>"HTML = HTML & "</body>"  HTML = HTML & "</html>"ObjMail.From = "sitedozanelati@ig.com.br"ObjMail.To = request.form("email")objMail.Bcc = "sitedozanelati@ig.com.br"ObjMail.Subject = "Cadastro na Busca - Site do Zanelati"ObjMail.Importance = 1ObjMail.BodyFormat=0ObjMail.MailFormat=0ObjMail.Body = HTMLObjMail.SendSet objMail = Nothing%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ops!Que tal irmos por passos! O código assim inteiro é meio complicado de entender!Mostre como está enviando! Quais dados quer mandar....

Compartilhar este post


Link para o post
Compartilhar em outros sites

estou pegando estes dados para mandar veja o codigo

<% 'Read in user deatils from the add URL formstrInputTitle = Request.Form("title")strInputURL = Request.Form("url")strInputDescription = Request.Form("description")strInputKeywords = Request.Form("keywords")strCategory = Request.Form("category") Set ObjMail = Server.CreateObject("Cdonts.Newmail") HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">" HTML = HTML & "<html>" HTML = HTML & "<head>"

 

na segunda parte veja ai

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.