... prova a sotituire questo al tuo codice...(ovviamente lascia gli include e tutto il resto) mi ricordo di aver riscontrato anche io la stessa anomalia... le email arrivavano solo all'amministratore e non a chi le richiedeva! (salvati ovviamente il tuo di codice... caso mai il mio non dovesse funzionarti bene)
Codice:
<%
If Request.QueryString("step") = "2" Then
Response.Redirect("recupera_password.asp?step=3&userCode=" & getUserCode(Request.Form("username"), Request.Form("email")))
ElseIf Request.QueryString("step") = "3" AND Request.QueryString("userCode") <> "" Then
MailOrder = "info@dominio.com" 'Indirizzo email del sito
strSender = MailOrder
strFromName = pageTitle & " Webmaster"
'strFromEmail = adminEmail
strRecipientsEmail = rs_viewuser("email")
strRecipientsName = rs_viewuser("nome")
strSubject = pageTitle & " Password Reminder"
strMessage = "------------------------------------------" & vbCrLf & _
strRecipientsName & ", Le informazioni da lei richieste:" & vbCrLf & vbCrLf & _
"Username: " & rs_viewuser("name") & vbCrLf & _
"Password: " & rs_viewuser("pass") & vbCrLf & vbCrLf & _
"Grazie per averci scelto," & vbCrLf & pageTitle & " Webmaster"
Select Case LCase(tipoMail)
Case "aspemail"
Set objNewMail = Server.CreateObject("Persits.MailSender")
objNewMail.Host = mailServer
objNewMail.FromName = strFromName
objNewMail.AddReplyTo strFromEmail
objNewMail.From = strFromEmail
objNewMail.AddAddress strRecipientsEmail, strRecipientsName
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
On Error Resume Next '## Ignora errore
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "aspmail"
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.FromName = strFromName
objNewMail.FromAddress = strFromEmail
'objNewMail.AddReplyTo = strFromEmail
objNewMail.RemoteHost = mailServer
objNewMail.AddRecipient strRecipientsName, strRecipientsEmail
objNewMail.Subject = strSubject
objNewMail.BodyText = strMessage
On Error Resume Next '## Ignore Errore
SendOk = objNewMail.SendMail
If not(SendOk) <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & objNewMail.Response & "</li>"
End if
Case "cdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
On Error Resume Next '## Ignora Errore
objNewMail.Send strFromEmail, strRecipientsEmail, strSubject, strMessage
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignora Errore
Case "cdosys"
Set objMessage = CreateObject("CDO.Message")
objMessage.From = strSender
'objMessage.Sender = strSender
objMessage.TextBody = strMessage
objMessage.To = strRecipientsEmail
objMessage.Subject = strSubject
objMessage.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignore Errors
Case "chilicdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
On Error Resume Next '## Ignora Errore
objNewMail.Host = mailServer
objNewMail.To = strRecipientsEmail
objNewMail.From = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignora Errore
Case "jmail"
Set objNewMail = Server.CreateObject("Jmail.smtpmail")
objNewMail.ServerAddress = mailServer
objNewMail.AddRecipient strRecipientsEmail
objNewMail.Sender = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
objNewMail.Priority = 3
On Error Resume Next '## Ignora Errore
objNewMail.Execute
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "jmail4"
Set objNewMail = Server.CreateObject("Jmail.Message")
'objNewMail.MailServerUserName = "myUserName"
'objNewMail.MailServerPassword = "MyPassword"
objNewMail.From = strFromEmail
objNewMail.FromName = strFromName
objNewMail.AddRecipient strRecipientsEmail, strRecipientsName
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
On Error Resume Next '## Ignore Errors
objNewMail.Send(mailServer)
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "smtp"
Set objNewMail = Server.CreateObject("SmtpMail.SmtpMail.1")
objNewMail.MailServer = mailServer
objNewMail.Recipients = strRecipientsEmail
objNewMail.Sender = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Message = strMessage
On Error Resume Next '## Ignore Errors
objNewMail.SendMail2
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
End Select
Set objNewMail = Nothing
On Error Goto 0
mailSent = True
ElseIf Request.QueryString("step") = "3" AND Request.QueryString("userCode") = "" Then
mailSent = False
emptyValue = True
Else
mailSent = False
End If
%>
ho controllato meglio il codice e ho pensato (come ad esempio è successo a me) che potresti avere problemi su aruba e così ho apportato alcune modifiche in maniera tale da far partire sempre e comunque l'email! quindi non tener conto del codice che ti ho postato sopra e metti questo e magari se mi fai sapere (se sei vivo o morto) è ancora meglio!:
Codice:
<%
If Request.QueryString("step") = "2" Then
Response.Redirect("recupera_password.asp?step=3&userCode=" & getUserCode(Request.Form("username"), Request.Form("email")))
ElseIf Request.QueryString("step") = "3" AND Request.QueryString("userCode") <> "" Then
MailOrder = "info@dominio.com" 'Indirizzo mittente ordini
strSender = MailOrder
strFromName = pageTitle & " Webmaster"
'strFromEmail = adminEmail
strRecipientsEmail = rs_viewuser("email")
strRecipientsName = rs_viewuser("nome")
strSubject = pageTitle & " Password Reminder"
strMessage = "------------------------------------------" & vbCrLf & _
strRecipientsName & ", Le informazioni da lei richieste:" & vbCrLf & vbCrLf & _
"Username: " & rs_viewuser("name") & vbCrLf & _
"Password: " & rs_viewuser("pass") & vbCrLf & vbCrLf & _
"Grazie per averci scelto," & vbCrLf & pageTitle & " Webmaster"
Select Case LCase(tipoMail)
Case "aspemail"
Set objNewMail = Server.CreateObject("Persits.MailSender")
objNewMail.Host = mailServer
objNewMail.FromName = strFromName
objNewMail.AddReplyTo strFromEmail
objNewMail.From = strFromEmail
objNewMail.AddAddress strRecipientsEmail, strRecipientsName
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
On Error Resume Next '## Ignora errore
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "aspmail"
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.FromName = strFromName
objNewMail.FromAddress = strFromEmail
'objNewMail.AddReplyTo = strFromEmail
objNewMail.RemoteHost = mailServer
objNewMail.AddRecipient strRecipientsName, strRecipientsEmail
objNewMail.Subject = strSubject
objNewMail.BodyText = strMessage
On Error Resume Next '## Ignore Errore
SendOk = objNewMail.SendMail
If not(SendOk) <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & objNewMail.Response & "</li>"
End if
Case "cdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
On Error Resume Next '## Ignora Errore
objNewMail.Send strFromEmail, strRecipientsEmail, strSubject, strMessage
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignora Errore
Case "cdosys"
Set objMessage = CreateObject("CDO.Message")
with objMessage
.From = strSender
'objMessage.Sender = strSender
.TextBody = strMessage
.To = strRecipientsEmail
.Subject = strSubject
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Update
.Send
end with
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignore Errors
Case "chilicdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
On Error Resume Next '## Ignora Errore
objNewMail.Host = mailServer
objNewMail.To = strRecipientsEmail
objNewMail.From = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
On Error Resume Next '## Ignora Errore
Case "jmail"
Set objNewMail = Server.CreateObject("Jmail.smtpmail")
objNewMail.ServerAddress = mailServer
objNewMail.AddRecipient strRecipientsEmail
objNewMail.Sender = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
objNewMail.Priority = 3
On Error Resume Next '## Ignora Errore
objNewMail.Execute
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "jmail4"
Set objNewMail = Server.CreateObject("Jmail.Message")
'objNewMail.MailServerUserName = "myUserName"
'objNewMail.MailServerPassword = "MyPassword"
objNewMail.From = strFromEmail
objNewMail.FromName = strFromName
objNewMail.AddRecipient strRecipientsEmail, strRecipientsName
objNewMail.Subject = strSubject
objNewMail.Body = strMessage
On Error Resume Next '## Ignore Errors
objNewMail.Send(mailServer)
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
Case "smtp"
Set objNewMail = Server.CreateObject("SmtpMail.SmtpMail.1")
objNewMail.MailServer = mailServer
objNewMail.Recipients = strRecipientsEmail
objNewMail.Sender = strFromEmail
objNewMail.Subject = strSubject
objNewMail.Message = strMessage
On Error Resume Next '## Ignore Errors
objNewMail.SendMail2
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Impossibile spedire l'email. Errore: " & Err.Description & "</li>"
End if
End Select
Set objNewMail = Nothing
On Error Goto 0
mailSent = True
ElseIf Request.QueryString("step") = "3" AND Request.QueryString("userCode") = "" Then
mailSent = False
emptyValue = True
Else
mailSent = False
End If
%>