% On Error Resume Next 'Insert your mailserver name and port (usually 25) mailserver="LOCALHOST" 'mailserver="paralerepensar.com.br:25" %>
Cartão Postal
Cachoeiras
| <%= afsogn %>
<%= akvedja %> |
Para:
<%= anafn1 %> <%= anetfang1 %> |
De: <%= anafn2 %> <%= anetfang2 %> |
" response.write "Number=" & err.number & "
" response.write "Explanation.=" & err.description & "
" response.write "Help Context=" & err.helpcontext & "
" response.write "Help Path=" & err.helppath & "
" response.write "Native Error=" & err.nativeerror & "
" response.write "Source=" & err.source & "
" response.write "SQLState=" & err.sqlstate & "
" end if IF conn.errors.count> 0 then response.write "Access database error" & "
" response.write SQLstmt & "
" for counter= 0 to conn.errors.count response.write "Error #" & conn.errors(counter).number & "
" response.write "Explanation. -> " & conn.errors(counter).description & "
" next Conn.Close set conn = nothing else Conn.Close set conn = nothing set conn = server.createobject("adodb.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.MapPath("kort.mdb") conn.Open DSNtemp sqlstmt = "SELECT * FROM kort WHERE nafn1 = " sqlstmt = sqlstmt & "'" & anafn1 & "'" sqlstmt = sqlstmt & " AND pass = " sqlstmt = sqlstmt & apass sqlstmt = sqlstmt & " ORDER BY id DESC;" 'rs.Open sqlstmt,conn,3,3 set rs = conn.Execute(sqlstmt) id = rs("id") Conn.Close Set conn = nothing dim mailbody scriptname = Request.servervariables("script_name") scriptname = Replace(scriptname,"cachoeira.asp","cachoeiraver.asp") scriptname = "http://" & request.servervariables("server_name") & scriptname mailbody = anafn2 & " enviou para você um cartão postal com uma mensagem muito especial." & Vbcrlf & vbcrlf mailbody = mailbody & "Para recebê-lo, clique no endereço abaixo e confira :" & vbcrlf mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass mailbody = mailbody & vbcrlf & vbcrlf mailbody = mailbody & "Ou visite: " & scriptname & vbcrlf mailbody = mailbody & "E entre com:" & vbcrlf mailbody = mailbody & "Número do cartão = " & id & vbcrlf mailbody = mailbody & "Password do cartão = " & apass & vbCrlf & vbcrlf mailbody = mailbody & "Escrito por - http://www.paralerepensar.com.br" blabla = "Você está recebendo um Cartão Postal de " & anafn2 'Response.Write mailbody 'set SMTP=Server.CreateObject("Jmail.SMTPMail") 'SMTP.ServerAddress= mailserver 'SMTP.Sender=anetfang2 'SMTP.AddRecipient anetfang1 'SMTP.Subject=blabla 'SMTP.Body=mailbody 'SMTP.Execute '########################### Set objMail = Server.CreateObject("SMTPsvg.Mailer") objMail.FromName = anafn2 objMail.FromAddress= anetfang2 objMail.RemoteHost = "localhost" objMail.AddRecipient anafn1, anetfang1 objMail.Subject = blabla objMail.ContentType = "text/plain" objMail.BodyText = mailbody if objMail.SendMail Then msgFinal = "
"&_ "Obrigado por utilizar os nossos serviços !!
"&_
"
Cartão postal enviado para : "& anafn1 &"
"&_ "Remetente : "& anafn2 &"
"&_ "" else msgFinal = "Ocorreu um erro ao processar seu cartão.
"&_
"
Favor tentar novamente
" end if %>![]()
Retornar
<%
end if
end if
%>