Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDONTS

Reply
Thread Tools

CDONTS

 
 
tom
Guest
Posts: n/a
 
      10-06-2004

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%>


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      10-06-2004
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%>
>
>



 
Reply With Quote
 
 
 
 
tom
Guest
Posts: n/a
 
      10-06-2004
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%>
> >
> >

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      10-06-2004
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...b;en-us;303734 for the SMTP
service configuration

http://support.microsoft.com/default...b;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]


 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      10-06-2004
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%>
>> >
>> >

>>
>>

>


 
Reply With Quote
 
tom
Guest
Posts: n/a
 
      10-06-2004
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%>
> >> >
> >> >
> >>
> >>

> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP ASP/CDONTS Ammar ASP .Net 3 06-07-2004 01:30 PM
CDONTS Stephan ASP .Net 2 12-02-2003 04:41 PM
Sending HTML formatted mail using CDONTS Paul Turley ASP .Net 2 08-12-2003 09:16 AM
Sending message to SMTP server using CDONTS component Chris Pearson ASP .Net 2 07-28-2003 12:06 PM
CDONTS object missing eddie wang ASP .Net 2 07-25-2003 07:07 AM



Advertisments