Di seguito, ho inserito il file mail-inc.asp, lo trovate nella cartella INCLUDES, modificato per l'uso di CDOSYS.
' Send mail with CDOSYS
' IN : sSender (string) : sender of the mail
' : sRecipient (string) : recipient of the mail (can use ; to send to many recipients)
' : sSubject (string) : subject of the mail
' : sText (string) : content of the mail
' : bHTML (boolean) : send HTML or text mail
' OUT : (boolean) : True
' Send mail with CDOSYS
' IN : sSender (string) : sender of the mail
' : sRecipient (string) : recipient of the mail (can use ; to send to many recipients)
' : sSubject (string) : subject of the mail
' : sText (string) : content of the mail
' : bHTML (boolean) : send HTML or text mail
' OUT : (boolean) : True
Function SendMail(ByVal sSender, ByVal sRecipient, ByVal sSubject, ByVal sText, ByVal bHTML)
Dim oMail, bOk
bOk = False
On Error Resume Next
Set oMail = Server.CreateObject("CDO.Message")
If Err.number <> 0 Then
Else
oMail.From = sSender
oMail.To = sRecipient
oMail.Subject = sSubject
If bHTML Then
oMail.HtmlBody = "" & vbCRLF & Text2HTML(sText) & vbCRLF & " "
Else
oMail.TextBody = sText
End If
oMail.Fields("urn:schemas:httpmail:importance").Value = 2
oMail.Fields.Update()
oMail.Send
bOk = True
End If
On Error GoTo 0
SendMail = bOk
Set oMail = Nothing
End Function
Dovete solo copiare e incollare su di un nuovo documento in NOTEPAD e salvare come mail-inc.asp