Salve,ho un hosting windows su aruba (quindi uso database ms access e .asp).Ho creato dei file in aspper la registrazione e il login,funzionano benissimo ma ho un solo problema:
Quando clicco da utente "password dimenticata" mi dice che mi ha inviato un email con i dati,questa email non arriva come mai?
Un po' di codice per voi:
Posta in uscita è impostata su CDOSYS con smtp di aruba,ho provato a mettere localhost al posto del mstp ma non và ugualmente
Quando clicco da utente "password dimenticata" mi dice che mi ha inviato un email con i dati,questa email non arriva come mai?
Un po' di codice per voi:
Codice:
<!--#include file="inc_common.asp" -->
<!--#include file="inc_viewuser.asp" -->
<%
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
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.Sender = strFromEmail
objMessage.TextBody = strMessage
objMessage.To = strFromEmail
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
%>
<% Server.Execute("header.asp") %>
<title><%=pageTitle%> - Recupera Password</title>
<% If mailSent = False Then %>
<% If emptyValue = True Then %>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<p align="center">Combinazione Username/Email non valida</p>
<% End If %>
<form name="pwForm" method="post" action="recupera_password.asp?step=2">
<table width="412" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="35" colspan="2" align="center"><strong><font size="5">Inserisci
username e email</font></strong></td>
</tr>
<tr>
<td colspan="2" height="4"></td>
</tr>
<tr>
<td width="30%">Username</td>
<td width="70%"><input name="username" type="text" id="username" size="35"></td>
</tr>
<tr>
<td colspan="2" height="4"></td>
</tr>
<tr>
<td width="30%">Email</td>
<td width="70%"><input name="email" type="text" id="email" size="35"></td>
</tr>
<tr>
<td colspan="2" height="4"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="Submit">
<input name="Reset" type="reset" id="Reset" value="Reset"></td>
</tr>
</table>
</form>
<% Else %>
<p align="center">Username e Password sono state spedite per email.</p>
<% End If %>
<% Server.Execute("footer.asp") %>
Posta in uscita è impostata su CDOSYS con smtp di aruba,ho provato a mettere localhost al posto del mstp ma non và ugualmente