CDONTS

Discussion in 'ASP General' started by tom, Oct 6, 2004.

  1. tom

    tom Guest

    Hi people -
    I've been trying to make run this form mail with CDONTS but doesnt work at
    all!
    it's the first time am using it,could anybody check out where the error
    might be and let me know, please?
    I trust in you, please help me
    - bye tom



    ***************************************************************************
    <!-- #include file="include/jconn_dati.asp" -->

    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="../~style/style.css">
    <script Language="Javascript">
    <!--

    function ControllaForm()
    {
    var controllo=false;
    var stringV=""
    var stringL=""
    var stringE=""
    var string=""
    var doc=document.info


    if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
    E-MAIL";}
    RE =
    /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9
    \-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
    if(RE.test(doc.user_email.value)==false){controllo=true;stringE = stringE
    + "\n- E-MAIL"; }
    if (doc.int_problema.value == "" ){controllo=true;stringV = stringV + "\n-
    PROBLEMA";}
    if (doc.int_problema.value.length > "1040" ){controllo=true;stringL =
    stringL + "\n- PROBLEMA (max.1040)";}


    if (stringV != ""){string = "\nI seguenti campi non sono stati
    compilati:"+"\n"+stringV;}else{
    if (stringL != ""){string = "\nI seguenti campi superano il limite di
    caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI seguenti
    campi contengono dati non validi:"+"\n"+stringE;}}

    if (controllo){alert("ERRORI RILEVATI NEL
    FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
    var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
    (messaggio){info.submit();}}

    }

    // -->
    </script>
    </head>
    <body>
    <%
    user_email=request.form("user_email")
    problema=request.form("int_problema")
    applicazione=request.form("int_appl")
    'int_email=request.form("int_email")

    if action="send" then

    messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
    tecnici risponderanno appena possibile.<br><br><a
    href='contattaci_bs.asp'>[Indietro]</a>"

    if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
    corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
    CONTATTACI -</title><style> BODY{background-color: white;font-family:
    Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
    GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
    corpo=corpo&"<b>USER EMAIL:</b> " &request.form("user_email")&"<br>"
    corpo=corpo&"<b>PROBLEMA:</b> " &request.form("int_problema")&"<br>"
    corpo=corpo&"<b>APPLICAZIONE:</b> " &request.form("int_appl")&"<br>"
    corpo=corpo&"</body></html>"

    Set objMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From = user_email
    objMail.To = " "
    objMail.Subject = oggetto
    objMail.BodyFormat = 0
    objMail.MailFormat = 0
    objMail.Body = corpo
    objMail.Importance = 1
    objMail.Send

    Set objMail = Nothing
    else
    messaggio="Tutti i campi del modulo sono <b>obbligatori</b>. Impossibile
    inviare la tua e-mail.<br>Torna indietro e compila tutti i campi.<br><br><a
    href='frm_ric.asp'>[BACK]</a>"
    end if
    %>
    <div align="center"><center>
    <table border="0" width="94%">
    <tr>
    <td width="100%" align="center"><%=messaggio%></td>
    </tr>
    </table>
    </center></div>
    <%
    else
    %>
    <form NAME="info" METHOD="post" align="center"
    action="home.asp?action=send">
    <table width="50%" border="0" cellspacing="0" cellpadding="8">
    <tr>
    <td width="20%">Email</td>
    <td width="80%">
    <input type="text" name="user_email" value="<%=user_email%>"
    size="60">
    </td>
    </tr>
    <tr>
    <td width="20%">Problema</td>
    <td width="80%"><textarea name="int_problema" value="<%=int_problema%>"
    rows="6" cols="60"></textarea></td>
    </tr>
    <tr>
    <td width="20%">Applicazione</td>
    <td width="80%">
    <select name="int_appl">
    <% if session("home_body") = "SW" then%>
    <!-- #include file="include/cbo_sw.asp"-->
    <%else%>
    <!-- #include file="include/cbo_hw.asp"-->
    <%end if%>
    </select>
    </td>
    </tr>
    <tr>
    <td width="20%">&nbsp;</td>
    <td ALIGN="center" width="80%"><div align="left"><p><strong><a
    href="javascript:ControllaForm()">INVIA</a></strong></td>
    </tr>
    </table>
    <%end if%>
     
    tom, Oct 6, 2004
    #1
    1. Advertising

  2. tom

    Patrice Guest

    Just repro the problem with the smallest possible amount of code (ie. just
    the CDONTS part if this is what fails) so that we don't have to read parts
    that works.
    Also always indicate the exact error you have....

    Patrice

    --

    "tom" <> a écrit dans le message de
    news:...
    >
    > Hi people -
    > I've been trying to make run this form mail with CDONTS but doesnt work at
    > all!
    > it's the first time am using it,could anybody check out where the error
    > might be and let me know, please?
    > I trust in you, please help me
    > - bye tom
    >
    >
    >
    >

    ***************************************************************************
    > <!-- #include file="include/jconn_dati.asp" -->
    >
    > <html>
    > <head>
    > <link rel="stylesheet" type="text/css" href="../~style/style.css">
    > <script Language="Javascript">
    > <!--
    >
    > function ControllaForm()
    > {
    > var controllo=false;
    > var stringV=""
    > var stringL=""
    > var stringE=""
    > var string=""
    > var doc=document.info
    >
    >
    > if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
    > E-MAIL";}
    > RE =
    >

    /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9
    > \-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
    > if(RE.test(doc.user_email.value)==false){controllo=true;stringE =

    stringE
    > + "\n- E-MAIL"; }
    > if (doc.int_problema.value == "" ){controllo=true;stringV = stringV +

    "\n-
    > PROBLEMA";}
    > if (doc.int_problema.value.length > "1040" ){controllo=true;stringL =
    > stringL + "\n- PROBLEMA (max.1040)";}
    >
    >
    > if (stringV != ""){string = "\nI seguenti campi non sono stati
    > compilati:"+"\n"+stringV;}else{
    > if (stringL != ""){string = "\nI seguenti campi superano il limite di
    > caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI seguenti
    > campi contengono dati non validi:"+"\n"+stringE;}}
    >
    > if (controllo){alert("ERRORI RILEVATI NEL
    > FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
    > var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
    > (messaggio){info.submit();}}
    >
    > }
    >
    > // -->
    > </script>
    > </head>
    > <body>
    > <%
    > user_email=request.form("user_email")
    > problema=request.form("int_problema")
    > applicazione=request.form("int_appl")
    > 'int_email=request.form("int_email")
    >
    > if action="send" then
    >
    > messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
    > tecnici risponderanno appena possibile.<br><br><a
    > href='contattaci_bs.asp'>[Indietro]</a>"
    >
    > if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
    > corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
    > CONTATTACI -</title><style> BODY{background-color: white;font-family:
    > Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
    > GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
    > corpo=corpo&"<b>USER EMAIL:</b> " &request.form("user_email")&"<br>"
    > corpo=corpo&"<b>PROBLEMA:</b> " &request.form("int_problema")&"<br>"
    > corpo=corpo&"<b>APPLICAZIONE:</b> " &request.form("int_appl")&"<br>"
    > corpo=corpo&"</body></html>"
    >
    > Set objMail = Server.CreateObject("CDONTS.NewMail")
    >
    > objMail.From = user_email
    > objMail.To = " "
    > objMail.Subject = oggetto
    > objMail.BodyFormat = 0
    > objMail.MailFormat = 0
    > objMail.Body = corpo
    > objMail.Importance = 1
    > objMail.Send
    >
    > Set objMail = Nothing
    > else
    > messaggio="Tutti i campi del modulo sono <b>obbligatori</b>. Impossibile
    > inviare la tua e-mail.<br>Torna indietro e compila tutti i

    campi.<br><br><a
    > href='frm_ric.asp'>[BACK]</a>"
    > end if
    > %>
    > <div align="center"><center>
    > <table border="0" width="94%">
    > <tr>
    > <td width="100%" align="center"><%=messaggio%></td>
    > </tr>
    > </table>
    > </center></div>
    > <%
    > else
    > %>
    > <form NAME="info" METHOD="post" align="center"
    > action="home.asp?action=send">
    > <table width="50%" border="0" cellspacing="0" cellpadding="8">
    > <tr>
    > <td width="20%">Email</td>
    > <td width="80%">
    > <input type="text" name="user_email" value="<%=user_email%>"
    > size="60">
    > </td>
    > </tr>
    > <tr>
    > <td width="20%">Problema</td>
    > <td width="80%"><textarea name="int_problema" value="<%=int_problema%>"
    > rows="6" cols="60"></textarea></td>
    > </tr>
    > <tr>
    > <td width="20%">Applicazione</td>
    > <td width="80%">
    > <select name="int_appl">
    > <% if session("home_body") = "SW" then%>
    > <!-- #include file="include/cbo_sw.asp"-->
    > <%else%>
    > <!-- #include file="include/cbo_hw.asp"-->
    > <%end if%>
    > </select>
    > </td>
    > </tr>
    > <tr>
    > <td width="20%">&nbsp;</td>
    > <td ALIGN="center" width="80%"><div align="left"><p><strong><a
    > href="javascript:ControllaForm()">INVIA</a></strong></td>
    > </tr>
    > </table>
    > <%end if%>
    >
    >
     
    Patrice, Oct 6, 2004
    #2
    1. Advertising

  3. tom

    tom Guest

    the problem is I don't get any email into my mail box.



    "Patrice" <> wrote in message
    news:...
    > Just repro the problem with the smallest possible amount of code (ie. just
    > the CDONTS part if this is what fails) so that we don't have to read parts
    > that works.
    > Also always indicate the exact error you have....
    >
    > Patrice
    >
    > --
    >
    > "tom" <> a écrit dans le message de
    > news:...
    > >
    > > Hi people -
    > > I've been trying to make run this form mail with CDONTS but doesnt work

    at
    > > all!
    > > it's the first time am using it,could anybody check out where the error
    > > might be and let me know, please?
    > > I trust in you, please help me
    > > - bye tom
    > >
    > >
    > >
    > >

    >

    ***************************************************************************
    > > <!-- #include file="include/jconn_dati.asp" -->
    > >
    > > <html>
    > > <head>
    > > <link rel="stylesheet" type="text/css" href="../~style/style.css">
    > > <script Language="Javascript">
    > > <!--
    > >
    > > function ControllaForm()
    > > {
    > > var controllo=false;
    > > var stringV=""
    > > var stringL=""
    > > var stringE=""
    > > var string=""
    > > var doc=document.info
    > >
    > >
    > > if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
    > > E-MAIL";}
    > > RE =
    > >

    >

    /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9
    > > \-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
    > > if(RE.test(doc.user_email.value)==false){controllo=true;stringE =

    > stringE
    > > + "\n- E-MAIL"; }
    > > if (doc.int_problema.value == "" ){controllo=true;stringV = stringV +

    > "\n-
    > > PROBLEMA";}
    > > if (doc.int_problema.value.length > "1040" ){controllo=true;stringL =
    > > stringL + "\n- PROBLEMA (max.1040)";}
    > >
    > >
    > > if (stringV != ""){string = "\nI seguenti campi non sono stati
    > > compilati:"+"\n"+stringV;}else{
    > > if (stringL != ""){string = "\nI seguenti campi superano il limite di
    > > caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI

    seguenti
    > > campi contengono dati non validi:"+"\n"+stringE;}}
    > >
    > > if (controllo){alert("ERRORI RILEVATI NEL
    > > FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
    > > var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
    > > (messaggio){info.submit();}}
    > >
    > > }
    > >
    > > // -->
    > > </script>
    > > </head>
    > > <body>
    > > <%
    > > user_email=request.form("user_email")
    > > problema=request.form("int_problema")
    > > applicazione=request.form("int_appl")
    > > 'int_email=request.form("int_email")
    > >
    > > if action="send" then
    > >
    > > messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
    > > tecnici risponderanno appena possibile.<br><br><a
    > > href='contattaci_bs.asp'>[Indietro]</a>"
    > >
    > > if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
    > > corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
    > > CONTATTACI -</title><style> BODY{background-color: white;font-family:
    > > Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
    > > GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
    > > corpo=corpo&"<b>USER EMAIL:</b> " &request.form("user_email")&"<br>"
    > > corpo=corpo&"<b>PROBLEMA:</b> " &request.form("int_problema")&"<br>"
    > > corpo=corpo&"<b>APPLICAZIONE:</b> " &request.form("int_appl")&"<br>"
    > > corpo=corpo&"</body></html>"
    > >
    > > Set objMail = Server.CreateObject("CDONTS.NewMail")
    > >
    > > objMail.From = user_email
    > > objMail.To = " "
    > > objMail.Subject = oggetto
    > > objMail.BodyFormat = 0
    > > objMail.MailFormat = 0
    > > objMail.Body = corpo
    > > objMail.Importance = 1
    > > objMail.Send
    > >
    > > Set objMail = Nothing
    > > else
    > > messaggio="Tutti i campi del modulo sono <b>obbligatori</b>.

    Impossibile
    > > inviare la tua e-mail.<br>Torna indietro e compila tutti i

    > campi.<br><br><a
    > > href='frm_ric.asp'>[BACK]</a>"
    > > end if
    > > %>
    > > <div align="center"><center>
    > > <table border="0" width="94%">
    > > <tr>
    > > <td width="100%" align="center"><%=messaggio%></td>
    > > </tr>
    > > </table>
    > > </center></div>
    > > <%
    > > else
    > > %>
    > > <form NAME="info" METHOD="post" align="center"
    > > action="home.asp?action=send">
    > > <table width="50%" border="0" cellspacing="0" cellpadding="8">
    > > <tr>
    > > <td width="20%">Email</td>
    > > <td width="80%">
    > > <input type="text" name="user_email" value="<%=user_email%>"
    > > size="60">
    > > </td>
    > > </tr>
    > > <tr>
    > > <td width="20%">Problema</td>
    > > <td width="80%"><textarea name="int_problema"

    value="<%=int_problema%>"
    > > rows="6" cols="60"></textarea></td>
    > > </tr>
    > > <tr>
    > > <td width="20%">Applicazione</td>
    > > <td width="80%">
    > > <select name="int_appl">
    > > <% if session("home_body") = "SW" then%>
    > > <!-- #include file="include/cbo_sw.asp"-->
    > > <%else%>
    > > <!-- #include file="include/cbo_hw.asp"-->
    > > <%end if%>
    > > </select>
    > > </td>
    > > </tr>
    > > <tr>
    > > <td width="20%">&nbsp;</td>
    > > <td ALIGN="center" width="80%"><div align="left"><p><strong><a
    > > href="javascript:ControllaForm()">INVIA</a></strong></td>
    > > </tr>
    > > </table>
    > > <%end if%>
    > >
    > >

    >
    >
     
    tom, Oct 6, 2004
    #3
  4. tom

    Patrice Guest

    As the code "works" (no on error resume next ?) it looks rather like a
    configuration problem on the SMTP service.
    I would check the directories under mailroot for possible reports (mailbox
    or badmail or just to see if mails are queued but not sent)...

    Try :
    http://support.microsoft.com/default.aspx?scid=kb;en-us;303734 for the SMTP
    service configuration

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;286421 allows to
    test manually the service...

    Good luck.

    Patrice

    --

    "tom" <> a écrit dans le message de
    news:...
    > the problem is I don't get any email into my mail box.
    >
    >
    >
    > "Patrice" <> wrote in message
    > news:...
    > > Just repro the problem with the smallest possible amount of code (ie.

    just
    > > the CDONTS part if this is what fails) so that we don't have to read

    parts
    > > that works.
    > > Also always indicate the exact error you have....
    > >
    > > Patrice
    > >


    [cut]
     
    Patrice, Oct 6, 2004
    #4
  5. tom

    Jeff Cochran Guest

    On Wed, 6 Oct 2004 12:38:55 +0200, "tom" <> wrote:

    >the problem is I don't get any email into my mail box.


    That doesn't indicate the code doesn't work. What version of IIS?
    Does your SMTP work correctly? Have you checked the SMTP logs and
    queue to see where the mail messages may be stopping?

    Jeff

    >"Patrice" <> wrote in message
    >news:...
    >> Just repro the problem with the smallest possible amount of code (ie. just
    >> the CDONTS part if this is what fails) so that we don't have to read parts
    >> that works.
    >> Also always indicate the exact error you have....
    >>
    >> Patrice
    >>
    >> --
    >>
    >> "tom" <> a écrit dans le message de
    >> news:...
    >> >
    >> > Hi people -
    >> > I've been trying to make run this form mail with CDONTS but doesnt work

    >at
    >> > all!
    >> > it's the first time am using it,could anybody check out where the error
    >> > might be and let me know, please?
    >> > I trust in you, please help me
    >> > - bye tom
    >> >
    >> >
    >> >
    >> >

    >>

    >***************************************************************************
    >> > <!-- #include file="include/jconn_dati.asp" -->
    >> >
    >> > <html>
    >> > <head>
    >> > <link rel="stylesheet" type="text/css" href="../~style/style.css">
    >> > <script Language="Javascript">
    >> > <!--
    >> >
    >> > function ControllaForm()
    >> > {
    >> > var controllo=false;
    >> > var stringV=""
    >> > var stringL=""
    >> > var stringE=""
    >> > var string=""
    >> > var doc=document.info
    >> >
    >> >
    >> > if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
    >> > E-MAIL";}
    >> > RE =
    >> >

    >>

    >/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9
    >> > \-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
    >> > if(RE.test(doc.user_email.value)==false){controllo=true;stringE =

    >> stringE
    >> > + "\n- E-MAIL"; }
    >> > if (doc.int_problema.value == "" ){controllo=true;stringV = stringV +

    >> "\n-
    >> > PROBLEMA";}
    >> > if (doc.int_problema.value.length > "1040" ){controllo=true;stringL =
    >> > stringL + "\n- PROBLEMA (max.1040)";}
    >> >
    >> >
    >> > if (stringV != ""){string = "\nI seguenti campi non sono stati
    >> > compilati:"+"\n"+stringV;}else{
    >> > if (stringL != ""){string = "\nI seguenti campi superano il limite di
    >> > caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI

    >seguenti
    >> > campi contengono dati non validi:"+"\n"+stringE;}}
    >> >
    >> > if (controllo){alert("ERRORI RILEVATI NEL
    >> > FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
    >> > var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
    >> > (messaggio){info.submit();}}
    >> >
    >> > }
    >> >
    >> > // -->
    >> > </script>
    >> > </head>
    >> > <body>
    >> > <%
    >> > user_email=request.form("user_email")
    >> > problema=request.form("int_problema")
    >> > applicazione=request.form("int_appl")
    >> > 'int_email=request.form("int_email")
    >> >
    >> > if action="send" then
    >> >
    >> > messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
    >> > tecnici risponderanno appena possibile.<br><br><a
    >> > href='contattaci_bs.asp'>[Indietro]</a>"
    >> >
    >> > if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
    >> > corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
    >> > CONTATTACI -</title><style> BODY{background-color: white;font-family:
    >> > Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
    >> > GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
    >> > corpo=corpo&"<b>USER EMAIL:</b> " &request.form("user_email")&"<br>"
    >> > corpo=corpo&"<b>PROBLEMA:</b> " &request.form("int_problema")&"<br>"
    >> > corpo=corpo&"<b>APPLICAZIONE:</b> " &request.form("int_appl")&"<br>"
    >> > corpo=corpo&"</body></html>"
    >> >
    >> > Set objMail = Server.CreateObject("CDONTS.NewMail")
    >> >
    >> > objMail.From = user_email
    >> > objMail.To = " "
    >> > objMail.Subject = oggetto
    >> > objMail.BodyFormat = 0
    >> > objMail.MailFormat = 0
    >> > objMail.Body = corpo
    >> > objMail.Importance = 1
    >> > objMail.Send
    >> >
    >> > Set objMail = Nothing
    >> > else
    >> > messaggio="Tutti i campi del modulo sono <b>obbligatori</b>.

    >Impossibile
    >> > inviare la tua e-mail.<br>Torna indietro e compila tutti i

    >> campi.<br><br><a
    >> > href='frm_ric.asp'>[BACK]</a>"
    >> > end if
    >> > %>
    >> > <div align="center"><center>
    >> > <table border="0" width="94%">
    >> > <tr>
    >> > <td width="100%" align="center"><%=messaggio%></td>
    >> > </tr>
    >> > </table>
    >> > </center></div>
    >> > <%
    >> > else
    >> > %>
    >> > <form NAME="info" METHOD="post" align="center"
    >> > action="home.asp?action=send">
    >> > <table width="50%" border="0" cellspacing="0" cellpadding="8">
    >> > <tr>
    >> > <td width="20%">Email</td>
    >> > <td width="80%">
    >> > <input type="text" name="user_email" value="<%=user_email%>"
    >> > size="60">
    >> > </td>
    >> > </tr>
    >> > <tr>
    >> > <td width="20%">Problema</td>
    >> > <td width="80%"><textarea name="int_problema"

    >value="<%=int_problema%>"
    >> > rows="6" cols="60"></textarea></td>
    >> > </tr>
    >> > <tr>
    >> > <td width="20%">Applicazione</td>
    >> > <td width="80%">
    >> > <select name="int_appl">
    >> > <% if session("home_body") = "SW" then%>
    >> > <!-- #include file="include/cbo_sw.asp"-->
    >> > <%else%>
    >> > <!-- #include file="include/cbo_hw.asp"-->
    >> > <%end if%>
    >> > </select>
    >> > </td>
    >> > </tr>
    >> > <tr>
    >> > <td width="20%">&nbsp;</td>
    >> > <td ALIGN="center" width="80%"><div align="left"><p><strong><a
    >> > href="javascript:ControllaForm()">INVIA</a></strong></td>
    >> > </tr>
    >> > </table>
    >> > <%end if%>
    >> >
    >> >

    >>
    >>

    >
     
    Jeff Cochran, Oct 6, 2004
    #5
  6. tom

    tom Guest

    I reckon the problem might be the SMTP configuration.. I will let you know
    later.
    thank you


    "Jeff Cochran" <> wrote in message
    news:...
    > On Wed, 6 Oct 2004 12:38:55 +0200, "tom" <> wrote:
    >
    > >the problem is I don't get any email into my mail box.

    >
    > That doesn't indicate the code doesn't work. What version of IIS?
    > Does your SMTP work correctly? Have you checked the SMTP logs and
    > queue to see where the mail messages may be stopping?
    >
    > Jeff
    >
    > >"Patrice" <> wrote in message
    > >news:...
    > >> Just repro the problem with the smallest possible amount of code (ie.

    just
    > >> the CDONTS part if this is what fails) so that we don't have to read

    parts
    > >> that works.
    > >> Also always indicate the exact error you have....
    > >>
    > >> Patrice
    > >>
    > >> --
    > >>
    > >> "tom" <> a écrit dans le message de
    > >> news:...
    > >> >
    > >> > Hi people -
    > >> > I've been trying to make run this form mail with CDONTS but doesnt

    work
    > >at
    > >> > all!
    > >> > it's the first time am using it,could anybody check out where the

    error
    > >> > might be and let me know, please?
    > >> > I trust in you, please help me
    > >> > - bye tom
    > >> >
    > >> >
    > >> >
    > >> >
    > >>

    >
    >***************************************************************************
    > >> > <!-- #include file="include/jconn_dati.asp" -->
    > >> >
    > >> > <html>
    > >> > <head>
    > >> > <link rel="stylesheet" type="text/css" href="../~style/style.css">
    > >> > <script Language="Javascript">
    > >> > <!--
    > >> >
    > >> > function ControllaForm()
    > >> > {
    > >> > var controllo=false;
    > >> > var stringV=""
    > >> > var stringL=""
    > >> > var stringE=""
    > >> > var string=""
    > >> > var doc=document.info
    > >> >
    > >> >
    > >> > if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
    > >> > E-MAIL";}
    > >> > RE =
    > >> >
    > >>

    >
    >/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-

    9
    > >> > \-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
    > >> > if(RE.test(doc.user_email.value)==false){controllo=true;stringE =
    > >> stringE
    > >> > + "\n- E-MAIL"; }
    > >> > if (doc.int_problema.value == "" ){controllo=true;stringV = stringV

    +
    > >> "\n-
    > >> > PROBLEMA";}
    > >> > if (doc.int_problema.value.length > "1040" ){controllo=true;stringL

    =
    > >> > stringL + "\n- PROBLEMA (max.1040)";}
    > >> >
    > >> >
    > >> > if (stringV != ""){string = "\nI seguenti campi non sono stati
    > >> > compilati:"+"\n"+stringV;}else{
    > >> > if (stringL != ""){string = "\nI seguenti campi superano il limite

    di
    > >> > caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI

    > >seguenti
    > >> > campi contengono dati non validi:"+"\n"+stringE;}}
    > >> >
    > >> > if (controllo){alert("ERRORI RILEVATI NEL
    > >> > FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
    > >> > var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
    > >> > (messaggio){info.submit();}}
    > >> >
    > >> > }
    > >> >
    > >> > // -->
    > >> > </script>
    > >> > </head>
    > >> > <body>
    > >> > <%
    > >> > user_email=request.form("user_email")
    > >> > problema=request.form("int_problema")
    > >> > applicazione=request.form("int_appl")
    > >> > 'int_email=request.form("int_email")
    > >> >
    > >> > if action="send" then
    > >> >
    > >> > messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
    > >> > tecnici risponderanno appena possibile.<br><br><a
    > >> > href='contattaci_bs.asp'>[Indietro]</a>"
    > >> >
    > >> > if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
    > >> > corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
    > >> > CONTATTACI -</title><style> BODY{background-color: white;font-family:
    > >> > Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
    > >> > GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
    > >> > corpo=corpo&"<b>USER EMAIL:</b> "

    &request.form("user_email")&"<br>"
    > >> > corpo=corpo&"<b>PROBLEMA:</b> "

    &request.form("int_problema")&"<br>"
    > >> > corpo=corpo&"<b>APPLICAZIONE:</b> "

    &request.form("int_appl")&"<br>"
    > >> > corpo=corpo&"</body></html>"
    > >> >
    > >> > Set objMail = Server.CreateObject("CDONTS.NewMail")
    > >> >
    > >> > objMail.From = user_email
    > >> > objMail.To = " "
    > >> > objMail.Subject = oggetto
    > >> > objMail.BodyFormat = 0
    > >> > objMail.MailFormat = 0
    > >> > objMail.Body = corpo
    > >> > objMail.Importance = 1
    > >> > objMail.Send
    > >> >
    > >> > Set objMail = Nothing
    > >> > else
    > >> > messaggio="Tutti i campi del modulo sono <b>obbligatori</b>.

    > >Impossibile
    > >> > inviare la tua e-mail.<br>Torna indietro e compila tutti i
    > >> campi.<br><br><a
    > >> > href='frm_ric.asp'>[BACK]</a>"
    > >> > end if
    > >> > %>
    > >> > <div align="center"><center>
    > >> > <table border="0" width="94%">
    > >> > <tr>
    > >> > <td width="100%" align="center"><%=messaggio%></td>
    > >> > </tr>
    > >> > </table>
    > >> > </center></div>
    > >> > <%
    > >> > else
    > >> > %>
    > >> > <form NAME="info" METHOD="post" align="center"
    > >> > action="home.asp?action=send">
    > >> > <table width="50%" border="0" cellspacing="0" cellpadding="8">
    > >> > <tr>
    > >> > <td width="20%">Email</td>
    > >> > <td width="80%">
    > >> > <input type="text" name="user_email"

    value="<%=user_email%>"
    > >> > size="60">
    > >> > </td>
    > >> > </tr>
    > >> > <tr>
    > >> > <td width="20%">Problema</td>
    > >> > <td width="80%"><textarea name="int_problema"

    > >value="<%=int_problema%>"
    > >> > rows="6" cols="60"></textarea></td>
    > >> > </tr>
    > >> > <tr>
    > >> > <td width="20%">Applicazione</td>
    > >> > <td width="80%">
    > >> > <select name="int_appl">
    > >> > <% if session("home_body") = "SW" then%>
    > >> > <!-- #include file="include/cbo_sw.asp"-->
    > >> > <%else%>
    > >> > <!-- #include file="include/cbo_hw.asp"-->
    > >> > <%end if%>
    > >> > </select>
    > >> > </td>
    > >> > </tr>
    > >> > <tr>
    > >> > <td width="20%">&nbsp;</td>
    > >> > <td ALIGN="center" width="80%"><div

    align="left"><p><strong><a
    > >> > href="javascript:ControllaForm()">INVIA</a></strong></td>
    > >> > </tr>
    > >> > </table>
    > >> > <%end if%>
    > >> >
    > >> >
    > >>
    > >>

    > >

    >
     
    tom, Oct 6, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. eddie wang

    CDONTS object missing

    eddie wang, Jul 23, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    721
    Salim Afsar
    Jul 25, 2003
  2. Chris Pearson
    Replies:
    2
    Views:
    455
    Kevin Spencer
    Jul 28, 2003
  3. Paul Turley

    Sending HTML formatted mail using CDONTS

    Paul Turley, Aug 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    349
    Parker Zhang [MSFT]
    Aug 12, 2003
  4. Stephan

    CDONTS

    Stephan, Dec 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    628
    Stephan Potgieter
    Dec 2, 2003
  5. Ammar

    HELP ASP/CDONTS

    Ammar, Jun 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    543
    Kevin Spencer
    Jun 7, 2004
Loading...

Share This Page