Ciao a tutti,
ho questo modulo per l'invio di un form.
Mi succede una cosa strana: l'invio non mi da errore ma non arriva nessuna mail.
C'è qualcuno disposto a darmi una mano? :master:
<%
Const cdoBasic = 1 'Use basic (clear-text) authentication.
Const cdoSendUsingPort = 2
Dim iMsg
Dim iConf
Dim Flds
On Error Resume Next
'Create message and configuration objects
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
'Apply settings to the configuration object
With Flds
' Specify the authentication mechanism to basic (clear-text) authentication.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
' The username for authenticating to an SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "indirizzomail"
' The password used to authenticate to an SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
' 1 se smtp e http sono sulla stessa macchina, 2 se sono su macchine diverse
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
'Specify mail server
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
'Specify the timeout in seconds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
' The port on which the SMTP service specified by the smtpserver field is listening for connections (typically
25)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'Use SSL for the connection (False or True)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
.Update
End With
Dim sMsg
Dim sTo
Dim sCC
Dim sFrom
Dim sSubject
Dim sTextBody
Dim msg
msg = msg & "<table width=600 border=1 cellpadding=0 cellspacing=0 bordercolor=#999999>"
msg = msg & "<tr><td colspan=2><H3>Dati provenienti dal modulo</H3></td></tr>"
msg = msg & "<tr><td width=200>Ragione Sociale</td><td>" &
request.form("Ragione_Sociale") & "</td></tr>"
msg = msg & "<tr><td width=200>Nome e Cognome</td><td>" & request.form("Nome_Cognome") &
"</td></tr>"
msg = msg & "<tr><td width=200>Indirizzo</td><td>" & request.form("Indirizzo") &
"</td></tr>"
msg = msg & "<tr><td width=200>CAP</td><td>" & request.form("CAP") & "</td></tr>"
msg = msg & "<tr><td width=200>Citta</td><td>" & request.form("Citta") & "</td></tr>"
msg = msg & "<tr><td width=200>Provincia</td><td>" & request.form("Provincia") &
"</td></tr>"
msg = msg & "<tr><td width=200>Nazione</td><td>" & request.form("Nazione") &
"</td></tr>"
msg = msg & "<tr><td width=200>Telefono</td><td>" & request.form("Telefono") &
"</td></tr>"
msg = msg & "<tr><td width=200>Fax</td><td>" & request.form("Fax") & "</td></tr>"
msg = msg & "<tr><td width=200>Email</td><td>" & request.form("Email") & "</td></tr>"
msg = msg & "</table>
"
sTo = "indirizzomail"
sFrom = "Contattaci"
sSubject = "Dati modulo CONTATTACI"
'Apply the settings to the message object
With iMsg
Set .Configuration = iConf
.To = sTo
.From = sFrom
.Subject = sSubject
.HtmlBody = msg
'Send message
.Send
End With
' cleanup mail objects
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
response.redirect "tanks.asp"
If Err.Number <> 0 Then
response.write "error"
End If
%>