I'm using the following code to auto generate an email to retrieve a forgotten password. The script doesn't send to AOL or Yahoo emails. I can't figure out why. Any help is appreciated. Thanks.
<%
Dim rsEmail__strEmail
rsEmail__strEmail = "1"
If (Request.Form("Email") <> "") Then
rsEmail__strEmail = Request.Form("Email")
End If
%>
<%
Dim rsEmail
Dim rsEmail_numRows
Set rsEmail = Server.CreateObject("ADODB.Recordset")
rsEmail.ActiveConnection = MM_DBConn_STRING
rsEmail.Source = "SELECT Email,Pswrd FROM dbo.tblLogin WHERE Email = '" +
Replace(rsEmail__strEmail, "'", "''") + "'"
rsEmail.CursorType = 0
rsEmail.CursorLocation = 2
rsEmail.LockType = 1
rsEmail.Open()
rsEmail_numRows = 0
IF rsEmail.EOF THEN
Response.Write "<p>" & "That email address was not found in our database.
Please click back on your browser and enter the email address you registered
with." & "</p>"
ELSE
DIM strPassword
strPassword = rsEmail("Pswrd")
sch = "http://schemas.microsoft.com/cdo/configuration/"
mailbody = "Here is your login password: " & rsEmail__strEmail
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.softscience.com"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "
[email protected]"
.To = rsEmail__strEmail
.Subject = "Password-Request"
.HTMLBody = mailbody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.Write "<p>" & "Your password has been sent to your email address."
& "</p>"
%>
<%
rsEmail.Close()
Set rsEmail = Nothing
End If
%>
Thanks.
-Dman100-