Ciao a tutti.
La domanda che vi pongo è proposta su due punti:

1) E' possibile inviare una mail tramite VBScript? (credo che la risposta sia sì)

2) Se è possibile, come faccio?

Tenete presente che ho la necessità di inserire un allegato nella mail.

Io ho consultato mamma MSDN ed ho provato a scrivere questo codice:
codice:
Public Sub InviaMail
   Dim iConf   ' Configurazione mail
   Dim Flds    ' Campi della configurazione
   Dim iMsg    ' Il messaggio di posta

   iConf = CreateObject("CDO.Configuration")
   Set Flds = iConf.Fields

   Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver")               = "smpt.host.it"
   Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport")           = 25
   Flds("http://schemas.microsoft.com/cdo/configuration/sendusing")                = 2  ' CdoSendUsing = 2
   Flds("http://schemas.microsoft.com/cdo/configuration/smtpaccountname")          = "LeleFT"
   Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress")         = """LeleFT"" <mioIndirizzo@host.it>"
   Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")         = 1   ' cdoBasic = 1

   Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mioNomeUtente"
   Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword")    = "miaPassword"
   Flds.Update

   Set iMsg = CreateObject("CDO.Message")
   Set iMsg.Configuration = iConf

   iMsg.AddAttachment( strExcelPath )
   iMsg.Subject = "Excel"
   iMsg.TextBody = "Messaggio contenente un allegato Excel"

   iMsg.Send
End Sub
Questo codice, però, mi dà il seguente errore, nella riga in grassetto:

Proprietà o metodo non supportati dall'oggetto iConf.Fields

Sapete aiutarmi? Fornirmi un modo alternativo, anche meno laborioso?

Grazie mille a tutti.


Ciao.