E' possibile in qualche maniera (request ServerVariables ad esempio) conoscere se su un server è installato il componente CDONTS o CDOSYS?
Grazie
E' possibile in qualche maniera (request ServerVariables ad esempio) conoscere se su un server è installato il componente CDONTS o CDOSYS?
Grazie
Chiamare il componente e verificare se da o no errore.
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
grazie, roby ma in giro (su un sito francese) mi pare... c'era uno script che restituiva anche il componente per l'invio delle email installato sul server (cdonts, cdosys, aspmail, etc)... ma non trovo più il link...
L'ho postto diverse volte fai una ricerca.
Lancia un serie di componenti prova a crearli.
Se non da errore il componente è installato.
E' quello che ti ho detto io, solo che quello script lo fa per una serie enorme di componenti.
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
grazie roby si chiama "com checker"... ma è possibile fare il test solo su cdonts e cdosys? ho scritto così:ma restituisce errore sulla riga rossa... :master:codice:<% Dim comList(2) comList(0) = Array( "CDOSYS", "CDO.Message" ) comList(1) = Array( "CDONTS","CDONTS.NewMail" ) Function IsAvailable( comIdentity ) On Error Resume Next IsAvailable = False Err = 0 Set xTestObj = Server.CreateObject( comIdentity ) If Err = 0 Then IsAvailable = True Set xTestObj = Nothing Err = 0 End Function Public Function CheckCOM() Avail = 0 strTxt = "<table cellpadding=3 cellspacing=3 border=0 align=center width=300>" & vbNewLine For Idx = LBound( comList ) To UBound( comList ) Provider = Idx strTxt = strTxt & vbTab & "<tr><td width=200><font class=norm>" & comList(Idx)(0) & "</font></td>" strTxt = strTxt & "<td align=right width=20><font class=norm>[</font></td>" If IsAvailable( comList(Idx)(1) ) Then strTxt = strTxt & "<td align=center><font face=tahoma size=2 color=blue>Available</font></td>" Avail = Avail + 1 Else strTxt = strTxt & "<td align=center><font class=norm>Unavailable</font></td>" End If strTxt = strTxt & "<td align=left width=20><font class=norm>]</font></td></tr>" & vbNewLine Next strTxt = strTxt & vbTab & "<tr><td colspan=4 height=30><font class=norm><font color=blue>" & Avail & "</font> of " strTxt = strTxt & UBound( comList ) + 1 & " supported components are available.</font></td></tr>" & vbNewLine CheckCOM = strTxt & "</table>" & vbNewLine End Function Response.Write( CheckCOM() ) %>
Che errore?
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
questo:Microsoft VBScript runtime error '800a000d'
Type mismatch: 'comList(...)'
/myforum/comchecker.asp, line 81
Risolto !secondo te sarebbe possibile con questo script una cosa del genere:codice:Dim comList(1) comList(0) = Array( "CDOSYS", "CDO.Message" ) comList(1) = Array( "CDONTS", "CDONTS.NewMail" )codice:if CDONTS = Available then 'invia con CDONTS else 'invia con CDOSYS end if
Si.
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
Ma come si valorizzano i due componenti?Originariamente inviato da Roby_72
Si.
Roby