Foros del Web » Programando para Internet » ASP Clásico »

Ayuda error 80040211

Estas en el tema de Ayuda error 80040211 en el foro de ASP Clásico en Foros del Web. <% option explicit Response.Expires = -1 Server.ScriptTimeout = 600 %> <!-- #include file="freeaspupload.asp" --> <% function OutputForm() %> <script language="javascript" src="WYSIWYG/source.js" type="text/javascript"></script> <form name="frmSend" method="POST" ...
  #1 (permalink)  
Antiguo 08/07/2010, 10:32
 
Fecha de Ingreso: diciembre-2009
Mensajes: 85
Antigüedad: 14 años, 5 meses
Puntos: 0
Ayuda error 80040211

<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
%>
<!-- #include file="freeaspupload.asp" -->
<%
function OutputForm()
%>
<script language="javascript" src="WYSIWYG/source.js" type="text/javascript"></script>
<form name="frmSend" method="POST" enctype="multipart/form-data" action="mensajecorp.asp" onSubmit="return onSubmitForm();">
<table border="0" width="75%">
<tr>
<td><strong>Nombre:</strong></td>
</tr>
<tr>
<td><input type="text" name="nombre" size="145"></td>
</tr>
<tr>
<td><strong>Información:</strong></td>
</tr>
<tr>
<td><TEXTAREA name="informa" rows="10" cols="110"></TEXTAREA></td>
</tr>

<tr>
<td><strong>Destinatarios:</strong></td>
</tr>
<tr>
<td>
<!-- OPCIONES DE ENVIO -->
<table>
<tr>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="1" id="11">XXXXXX</td>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="2" id="12">XXXXXX</td>
</tr>
<tr>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="3" id="13">XXXX</td>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="4" id="14">XXXXXX</td>
</tr>
<tr><td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="5" id="15">XXXX</td>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="6" id="16">xxxxxxxxx</td></tr>
<td style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold"><input type="checkbox" name="destinos" value="7" id="17">XXXXXXX</td></tr>
<td>prueba</td>
</table>
</td>
</tr>
<br>
<tr>
<td align="center"> <!-- End of additional elements -->
<input style="margin-top:4; color:#FFFFFF; background:#006600; font:bold" type="submit" value="Enviar !">
</td>
</tr>
</table>
</form>
<%
end function

function TestEnvironment()
Dim fso, fileName, testFile, streamTest
TestEnvironment = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(uploadsDirVar) then
TestEnvironment = "<B>Folder " & uploadsDirVar & " does not exist.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
exit function
end if
fileName = uploadsDirVar & "\test.txt"
on error resume next
Set testFile = fso.CreateTextFile(fileName, true)
If Err.Number<>0 then
TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have write permissions.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
exit function
end if
Err.Clear
testFile.Close
fso.DeleteFile(fileName)
If Err.Number<>0 then
TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have delete permissions</B>, although it does have write permissions.<br>Change the permissions for IUSR_<I>computername</I> on this folder."
exit function
end if
Err.Clear
Set streamTest = Server.CreateObject("ADODB.Stream")
If Err.Number<>0 then
TestEnvironment = "<B>The ADODB object <I>Stream</I> is not available in your server.</B><br>Check the Requirements page for information about upgrading your ADODB libraries."
exit function
end if
Set streamTest = Nothing
end function

function SaveFiles
Dim Upload, fileName, fileSize, ks, i, fileKey

Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)

' If something fails inside the script, but the exception is handled
If Err.Number<>0 then Exit function

SaveFiles = ""
ks = Upload.UploadedFiles.keys
if (UBound(ks) <> -1) then
SaveFiles = "<B>Archivo cargado:</B> "
for each fileKey in Upload.UploadedFiles.keys
SaveFiles = SaveFiles & Upload.UploadedFiles(fileKey).FileName & " (" & Upload.UploadedFiles(fileKey).Length & "B) "
dim nomb
nomb= Upload.UploadedFiles(fileKey).FileName
next
else
'SaveFiles = "El nombre del archivo especificado en el formulario no corresponde a una extensión válida en el sistema."
end if
SaveFiles = SaveFiles & "<B><br>Nombre: </B> " & Upload.Form("nombre") & "<br>"
'SaveFiles = SaveFiles & "<B>Destinatarios: </B> " & Upload.Form("destinos") & "<br>"
SaveFiles = SaveFiles & "<B>Informacion: </B> " & Upload.Form("informa") & "<br>"
dim m
dim SQL
dim rs
dim fecha
dim link
link= "archivos" & "/" & nomb
fecha = Date()

Dim Mail,Config,destinos1,destinos2,destinos3,destinos 4,destinos5,destinos6,destinos7,sMyString
Set Mail = Server.createObject("CDO.Message")
Set Config = Server.createObject ("CDO.Configuration")
With Config
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xx.xx.xx.xx"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Fields.update
End With
Set Mail.Configuration = Config
Mail.From = "xxxxx@xxxxx"

'response.Write(Upload.Form("destinos"))
if Instr(Upload.Form("destinos"),1)>0 then

'destinos1= "xxxxx@xxxxx"

end if

if Instr(Upload.Form("destinos"),2)>0 then
destinos2= "xxxxx@xxxxx"

end if

if Instr(Upload.Form("destinos"),3)>0 then

'destinos3= "xxxxx@xxxxx"
destinos3= "xxxxx@xxxxx"
end if

if Instr(Upload.Form("destinos"),4)>0 then

destinos4= "xxxxx@xxxxx"

end if

if Instr(Upload.Form("destinos"),5)>0 then
destinos5= "xxxxx@xxxxx"

end if

if Instr(Upload.Form("destinos"),6)>0 then

destinos6= "xxxxx@xxxxx"
end if

if Instr(Upload.Form("destinos"),7)>0 then

destinos7= "xxxxx@xxxxx"
end if

sMyString = Upload.Form("destinos")
sMyString = Replace(sMyString, "1", destinos1)
sMyString = Replace(sMyString, "2", destinos2)
sMyString = Replace(sMyString, "3", destinos3)
sMyString = Replace(sMyString, "4", destinos4)
sMyString = Replace(sMyString, "5", destinos5)
sMyString = Replace(sMyString, "6", destinos6)
sMyString = Replace(sMyString, "7", destinos7)
Response.Write sMyString
Mail.To = sMyString

response.Write("<br>PARA: " & Mail.To & "<br>")
Mail.Send() ************************linea del error****
Set Mail = Nothing
end function
%>
<HTML>
<HEAD>
<script src="../../../JavaScript/AC_RunActiveContent.js" type="text/javascript"></script>
<%
dim oConn
set oConn=Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("Diario.mdb")
%>
<style>
BODY {background-color: white;font-family:arial; font-size:12}
</style>
<script>
function onSubmitForm() {
var formDOMObj = document.frmSend;
if (frmSend.nombre.value== ""){
alert("debe llenar el campo Nombre")
return false;
}
else if (frmSend.informa.value== ""){
alert("Debe escribir la información");
return false;
}
else if ((frmSend.destinos[0].checked== false) && (frmSend.destinos[1].checked== false)&&(frmSend.destinos[2].checked== false) && (frmSend.destinos[3].checked== false)&& (frmSend.destinos[4].checked== false)&&(frmSend.destinos[5].checked== false)&&(frmSend.destinos[6].checked== false)&&(frmSend.destinos[7].checked== false)){
alert("Debe elegir al menos un destinatario");
return false;
}

else{
return true;
}
}
</script>
</HEAD>
<BODY>
<table width="800" border="0" align="center" cellpadding="0">
<tr>
<!--ENCABEZADO-->
<td align="center">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','780','heigh t','130','src','../../../Flash/Encabezados/Standart/header_bvl','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../../../Flash/Encabezados/Standart/header_bvl'); //end AC code
</script>
</td>
</tr>
</table>
<br><br>
<div style="border-bottom: #006600 2px solid;font-size:24"><strong>Administracion de Informaciones</strong></div>
<%
Dim diagnostics
if Request.ServerVariables("REQUEST_METHOD") <> "POST" then
diagnostics = TestEnvironment()
if diagnostics<>"" then
response.write "<div style=""margin-left:20; margin-top:30; margin-right:30; margin-bottom:30;"">"
response.write diagnostics
response.write "<p>After you correct this problem, reload the page."
response.write "</div>"
else
response.write "<div style=""margin-left:150"">"
OutputForm()
response.write "</div>"
end if
else
response.write "<div style=""margin-left:150"">"
OutputForm()
response.write SaveFiles()
response.write "<br><br></div>"
end if
%>
<!-- Please support this free script by having a link to freeaspupload.net either in this page or somewhere else in your site. -->
<div style="border-bottom: #006600 2px solid;font-size:10"></div>
<br><br>
<!-- end of html to remove ------------------------->
<div align="center"><input type="button" value="Regresar" name="back" onClick="javascript=window.location='default.asp'" ></div>
</BODY>
</HTML>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:06.