Condividi:        

[ASP]Error 80040213 su istruzione CDOMAIL.SEND

Problemi di HTML? Di PHP, ASP, .NET, JSP, Perl, SQL, JavaScript, Visual Basic..?
Vuoi realizzare programmi in C, C++, Java, Ruby o Smalltalk, e non sai da che parte cominciare?
Entra qui e troverai le risposte!

Moderatori: Anthony47, Triumph Of Steel, archimede

[ASP]Error 80040213 su istruzione CDOMAIL.SEND

Postdi Barabba2007 » 20/03/08 19:07

Salve ragazzi, qualcuno può aiutarmi ???
MI DA' QUESTO ERRORE IN UNA PAGINA ASP DA UN SITO...

"CDO.MESSAGE.1 Error "80040213"
The transport failed to connect to the server.
/registrazioneX.asp, lin 153"

Sotto metto il FILE ASP COMPLETO
LA LINEA 153 è questa... "CDOMAIL.SEND ()"

COSA PUO' ESSERE? ??? :cry:
Codice: Seleziona tutto
<%Response.Expires = 0%>
<!-- #INCLUDE FILE = "percorso.asp" -->
<%
Session("CurrentAction")="registrazione.asp"
FormAction = ("registrazioneX.asp")
ScriptRelativeFolder = ("")
pos=InstrRev(LCase(Request.ServerVariables("PATH_TRANSLATED")),LCase(ScriptRelativeFolder) & "\" & LCase(FormAction))
BS_Root = Left(Request.ServerVariables("PATH_TRANSLATED"), pos-1 )
ScriptFolderAddress =BS_Root & "\" & ScriptRelativeFolder & "\"
URL =Request("URL")
SERVER_NAME=Request("SERVER_NAME")
SERVER_NAME="http://"&SERVER_NAME&URL
pos=InstrRev(LCase(SERVER_NAME),LCase(ScriptRelativeFolder) & "/" & LCase(FormAction))
BS_Root_URL = Left(SERVER_NAME, pos-1)
BS_Root_URL = BS_Root_URL & "/"

'==========Costanti=============
dim dest
dim iddest
'dest= Response.AppendToLog ("destina")
'dest= Session("alexj2")
'iddest= Session("alexj3")
dest= request("destin")
iddest=request("iddestin")

'---- Valore Cursore TypeEnum  ----
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3

'---- LockTypeEnum Values ----
Const adLockReadOnly = 1
Const adLockPessimistic = 2
Const adLockOptimistic = 3
Const adLockBatchOptimistic = 4
'=========Fine Sezione===========
Function GetPhisicalPath(string_to_transform)
  pos=InstrRev(LCase(Request.ServerVariables("PATH_TRANSLATED")),LCase(FormAction))
  GetPhisicalPath =  Left(Request.ServerVariables("PATH_TRANSLATED"), pos-1 )&string_to_transform
  end Function

Function escape_symbols(string_to_escape)
 string_to_escape_ret=Replace(string_to_escape,"'","''")
 escape_symbols=string_to_escape_ret
end Function

if Request("Code")= "" Then
Code = "" 'Valore di Deafult
else
Code =  Request("Code")
end if


%>


<html>
<head>
<TITLE>Registrazione utente</TITLE>
<LINK REL="StyleSheet" HREF="ModuliX.css" TYPE="text/css"></head>
</head>
<BODY bgcolor=#ffd9b7 topmargin="5" leftmargin="10">

<%

   IF request.form ("Message")="True" THEN
   strTB1=request.form("Nome")
   strTB2=request.form("Cognome")
   strTB3=request.form("Telefono")
   strTB4=request.form("Email")
   strTB5=request.form("Destinazione")
   strTB6=request.form("IDViaggio")
         strTB7=request.form("Indirizzo")
         strTB7b= (request.form("CatXY") * 1)
   strTB8=request.form("Rag_Soc")
      strRB=request.form("Opzioni")
   userz =strTB1
   pwdz = strTB2


   strTB50=request.form("Destinazione")
   strTB60=request.form("IDViaggio")
       strTB18=request.form("RichPart")
   
   IF strTB18 = "" THEN
       iLenMB1=255
     ELSE
       iLenMB1 = Len(strTB18)
    END IF%>
<%


IOME =Request.ServerVariables("SERVER_NAME")
if iome = "www.zarantonelloviaggi.com" then

   Set Mail = Server.CreateObject("cdonts.newmail")

'Il campo CC deve contenere l'email di destinazione della copia o deve essere vuoto
'Il campo MessageType deve essere HTML o TEXT

html = Html & "<HTML>"
html = Html & "<HEAD>"
html = Html & " <meta http-equiv=""content-type"""
html = Html & " content=""text/html; charset=iso-8859-1"">"
html = Html & "<title>Alexj Web Solutions</title>"
html = Html & "</head>"
html = Html & "<BODY bgcolor= palegreen>"
html = Html & "<TABLE width=100% valign=middle align=center border=0>"
html = Html & " <TR>"
html = Html & " <Td align=center  valign=middle> <img src='http://www.zarantonelloviaggi.com/aw1.gif'  align=absmiddle   width='12%' id=0   >"
html = Html & " </td></tr>"
html = Html & "</TABLE>"
html = Html & "<TABLE align=center width=90%  border=1>"
html = Html & "<tr><td colspan=2><P align=center><FONT face=Verdana size=3><B>Richiest di Registrazione </FONT></B></P></td></tr>"
if strRB = 1 then
html = Html & "<tr><td><B><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2> Il cliente:               "&strTB1 &" "& strTB2 &"</FONT></td><td><b><p align=center style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2>Privato</FONT></B></P></td></tr>"
else
html = Html & "<tr><td><B><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2> Il cliente:               "&strTB1 &" "& strTB2 &"</FONT></td><td><b><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2>Ditta: " & strTB8 &"</FONT></B></P></td></tr>"
end if
html = Html & "<tr><td><B><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2> Mail: "&strTB4 & "</FONT></td><td><b><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2>Telefono: " & strTB3 &"</FONT></B></P></td></tr>"
html = Html & "<tr><td colspan=2><P align=center><FONT face=Verdana size=2><B>&nbsp; </FONT></B></P></td></tr>"
html = Html & "<tr><td colspan=2><p align=center style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2><B>Richiede iscrizione e informazioni/preventivo per:  </FONT></B></P></td></tr>"
html = Html & "<tr><td colspan=2><B><p style=margin-bottom=0; margin-top = 0;><FONT face=Verdana size=2> "&strTB18 & "</FONT></td></tr>"
html = Html & "</TABLE>"
html = Html & "<P align=center><B><FONT face=Verdana size=2> "
html = Html & "</BODY>"
html = Html & "</HTML>"
 
'inizio config mail
    sch = "http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig = CreateObject("CDO.Configuration")
    With cdoConfig.Fields
        .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
        .Item(sch & "smtpserver") = "localhost"
        .Item(sch & "smtpserverport") = "27"
        .update
    End With
   
 ' fine config inizio mail
   
    Set cdoMail = CreateObject("CDO.Message")

        Set cdoMail.Configuration = cdoConfig

CDOMail.From =  "msg_dal_sito@zarantonelloviaggi.com"
CDOMail.To = "e-viaggi@zarantonelloviaggi.com" 'Email 'nomecampo mail cliente
'CDOMail.CC = "info@alexjweb.com"
CDOMail.Subject = "Richiesta di Registrazione"
CDOMail.HTMLBody = html
CDOMail.Send()
   
    html = ""
    Set cdoMail = Nothing
    Set cdoConfig = Nothing





else

Response.Write "<h5><font color=red><center>Non stai lavorando nel sito giusto<br><br></h5>"
end if





   %><%
   strProvider="Driver=Microsoft Access Driver (*.mdb); DBQ=" & DB_Path
   set objConn = server.createobject("ADODB.Connection")
    objConn.Open strProvider
   set cm = Server.CreateObject("ADODB.Command")
   cm.ActiveConnection = objConn
   
   cm.CommandText ="INSERT INTO clienti(Nome,Cognome,Tel,Email,Destinazione,Codice,Ind,Catx) VALUES (?,?,?,?,?,?,?,?)"

   set objparam=cm.createparameter(, 200, , 255, strTB1)
   cm.parameters.append objparam
   set objparam=cm.createparameter(, 200, , 255, strTB2)
   cm.parameters.append objparam
   set objparam=cm.createparameter(, 200, , 255, strTB3)
   cm.parameters.append objparam
   set objparam=cm.createparameter(,200, , 255, strTB4)
   cm.parameters.append objparam
   set objparam=cm.createparameter(,200, , 255, strTB5)
   cm.parameters.append objparam
   set objparam=cm.createparameter(,200, , 255, strTB6)
   cm.parameters.append objparam
   set objparam=cm.createparameter(,200, , 255, strTB7)
   cm.parameters.append objparam
   set objparam=cm.createparameter(,200, , 255, strTB7b)
   cm.parameters.append objparam


   cm.execute
      objCOnn.Close
      set objConn = nothing
      
set cm =nothing
   Session.Abandon
   %>
   
   
<%   
   
   set cn = Server.CreateObject("AdoDb.Connection")
   set rs = Server.CreateObject("AdoDb.Recordset")
   cn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& DB_Path
   qry = "Select * from clienti Where ((Nome='"
   qry = qry & userz & "') AND (Cognome='"
   qry = qry & pwdz & "'));"   'Confiduro il recordset e lo apro
   rs.ActiveConnection = cn
   rs.CursorLocation = 2 '1 nessuno: 2 server: 3 client
   rs.Open qry
      
yxz = rs.fields("IDcount")


   %>
   
   <%
      strProvider1="Driver=Microsoft Access Driver (*.mdb); DBQ=" & DB_Path
   set objConn1 = server.createobject("ADODB.Connection")
    objConn1.Open strProvider1
   set cm1 = Server.CreateObject("ADODB.Command")
   cm1.ActiveConnection = objConn1
   
   cm1.CommandText ="INSERT INTO preventivi(idCliente,CodiceD,Destinazione,RichPArt) VALUES (?,?,?,?)"

   set objparam=cm1.createparameter(,200, , 255, YXZ)
   cm1.parameters.append objparam
   set objparam=cm1.createparameter(,200, , 255, strTB60)
   cm1.parameters.append objparam
   set objparam=cm1.createparameter(,200, , 255, strTB50)
   cm1.parameters.append objparam
   set objparam=cm1.createparameter(,200, , iLenMB1, strTB18)
   cm1.parameters.append objparam
   
   
   cm1.execute

   
   
   Session.Abandon
   
   %>
   
   <h1 style="margin-top: 0px; margin-bottom: 8px"><%response.write("Richiesta Informazioni")  %></h1>
   
<BODY bgcolor=#ffd9b7 topmargin="5" leftmargin="10">
<h4 align=justify style="margin-bottom: 30">
La vostra richiesta è stata regolarmente inviata. Vi faremo pervenire al più presto ad uno dei recapiti indicati una proposta su misura per voi. Per ogni ulteriore informazione contattateci direttamente ai seguenti recapiti:</h4>

<h4 align=center style="margin-bottom: 10"><b>Tel.&nbsp;&nbsp; +39 0444 491888</b></h4>
<h4 align=center style="margin-bottom: 10"><b>Fax&nbsp;&nbsp;  +39 0444 490777</b></h4>
<h4 align=center style="margin-bottom: 30"><b>info@zarantonelloviaggi.com</b></h4>
<p  align=center><input type=button value="Continua" onClick="go();"  id=button1 name=button1 style="background: blue; color=white"></P>
<P><%=pips%></P>
</body>
<SCRIPT LANGUAGE="JavaScript">
function go(){
location.href= 'mainyy.asp'
}
</Script>
<%ELSE%>   
<HTML>
<HEAD>
<TITLE>Dettaglio Prodotti</TITLE>
<LINK REL="StyleSheet" HREF="ModuliX.css" TYPE="text/css"></head>
<STYLE TYPE="text/css">
</STYLE>
</HEAD>

<BODY bgcolor=#ffd9b7 topmargin="5" leftmargin="10">
<form name=viaggi  action="registrazioneX.asp"  method="post"  OnSubmit="return check_form(document.forms.viaggi)">
   
<h3><b>
Compilando il modulo avrai modo di accedere ai nostri servizi dell'area <b>RISERVATA</b> verrai automaticamente inserito nella nostra mailing-list e potrai così ricevere direttamente le nostre migliori offerte.
</b></h3>
<br>
<INPUT  type=hidden NAME="IDViaggio" value="<%=Code%>" SIZE=5>
<INPUT   type=hidden name=Destinazione size=23 value="<%=dest%>"
  bgcolor="#999999">
    <INPUT NAME="Rag_Soc" value="No"  type=hidden   >
    <INPUT NAME="CatXY" value= 1  type=hidden  >

<TABLE  align=center WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=2 ><TBODY>

<tr>
<TD width=15%><h4>Nome:</h4></TD>
<TD width=30%><INPUT NAME="Nome"  value="" SIZE=25 ></TD>
<TD width=25%><h4>&nbsp;&nbsp;Cognome:</h4></TD>
<TD width=30%><INPUT NAME="Cognome"  value="" SIZE=25 ></TD>
</tr>
<tr>
<TD width=15%><h4>Telefono:</h4></TD>
<TD width=30%><INPUT NAME="Telefono" value="" SIZE=25 ></TD>
<TD width=25%><h4>&nbsp;&nbsp;E-mail:</h4></TD>
<TD width=30%><INPUT NAME="Email" value="" SIZE=25 ></TD>
</tr>
<tr>
<TD width=25%><h4>Note varie:</h4></TD>
<TD width=30%><textarea name="RichPart" rows=2 cols=21 >...</textarea>
</TD><td>&nbsp;</td><td>
</td>
</tr>
</TBODY>
</TABLE></TBODY>

<INPUT  name=Indirizzo type=hidden value=1><INPUT name=Message type=hidden value=True>

<h6>Ai sensi della legge 675/96, i dati personali raccolti saranno utilizzati esclusivamente al fine di permettere l'accesso ai servizi offerti da questo sito. Per tali finalità non è richiesto l'esplicito consenso dell'utente poichè il trattamento verrà effettuato in modo da garantire comunque la riservatezza delle informazioni, come previsto dall'art. 15 della suddetta legge.</h6>
<p align=center style="margin-top: 5;margin-bottom:0">
<input type="submit" value="Invia   Informazioni" id=submit1 name=submit1 style="HEIGHT: 24px; background:e69d6a; color:white"></p>
</form>
<form name="myform" method="post" action="login_z.asp" target=_top onSubmit="return controlla_Login();">
 <table cellSpacing="0" cellPadding="6" width="501" border="0" align="center" bgcolor=#f6bc91>
  <tr>
    <td colspan="5" align="center" width="476">
    <h2 style="margin-top: 0; margin-bottom: 0">SEI UN UTENTE REGISTRATO?<br>
    &nbsp;VISUALIZZA SUBITO IL PROGRAMMA E PRENOTA ON-LINE</h2>
    </td>
  </tr>
  <tr>
    <td width="119" align="right">
    <h6>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Username:</h6>
    </td>
    <td align="left" width="208" >
    <b><font face="Times New Roman" size="1">
    <input style="WIDTH: 100px; HEIGHT: 25px" maxLength="20" name="txtUser" size="20"></font></b></td>
    <td width="112" >
    <h6>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Password:</h6>
    </td>
    <td align="left" width="169">
    <input style="WIDTH: 100px; HEIGHT: 25px" type="password" maxLength="20" name="txtPwd" size="20"></td>
    <td align="left" width="44">
      <input type="submit" name="I2" value=" Accedi " style="color: white; background: e69d6a"></div>
    </td>
  </tr>
</table>
</form>
<SCRIPT LANGUAGE="JavaScript" SRC="registrazioneX.js">

</SCRIPT>
<script>

function controlla_Login(){
   if (document.myform.txtUser.value==""){
      alert("Inserire lo Username");
      return false;
   }
   if (document.myform.txtPwd.value==""){
      alert("Inserire la Password");
      return false;
   }
   return true;
}
function gotoLostPawwsord(){
   window.open("default.asp", "", "scrollbars=no,status=no,width=300,height=200,resizable=no");
}
</script>
<%End if%>
</BODY>
</html>


Moderazione: titolo modificato perché in violazione della Netiquette (# 3) e aggiunto tag CODE.
Barabba2007
Utente Junior
 
Post: 79
Iscritto il: 29/06/07 15:02

Sponsor
 

Re: [ASP]Error 80040213 su istruzione CDOMAIL.SEND

Postdi Barabba2007 » 24/03/08 12:59

?????
Barabba2007
Utente Junior
 
Post: 79
Iscritto il: 29/06/07 15:02

Re: [ASP]Error 80040213 su istruzione CDOMAIL.SEND

Postdi Triumph Of Steel » 24/03/08 21:45

ma il server dove esegiu le pagine asp è il tuo PC?
prova a mettere l'SMTP del tuo provider qui:
Codice: Seleziona tutto
.Item(sch & "smtpserver") = "localhost"
Avatar utente
Triumph Of Steel
Moderatore
 
Post: 7852
Iscritto il: 22/08/01 01:00


Torna a Programmazione


Topic correlati a "[ASP]Error 80040213 su istruzione CDOMAIL.SEND":


Chi c’è in linea

Visitano il forum: Nessuno e 14 ospiti