Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2004, 01:05 AM
Authorized User
 
Join Date: Apr 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default cdo message problem

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-


 
Old September 8th, 2004, 12:29 AM
Authorized User
 
Join Date: Apr 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please disregard...I figured it out. Thanks.

 
Old September 10th, 2004, 10:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you could, Can you post on how you figured that out?

_________________________
- Vijay G
Strive for Perfection
 
Old September 11th, 2004, 08:06 PM
Authorized User
 
Join Date: Apr 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Vijay,

The problem was related to AOL and Yahoo and not recognizing my testing server IP. I don't have the SMTP virtual server setup on my testing server. The testing server would still send out to the remote server by default, but the original IP is coming from my server. Once I uploaded to the remote production server it worked fine for both AOL and Yahoo.

Interestingly, I did get an auto-response from AOL saying that the email was on hold for delivery and after about a day it was kicked back to me as undeliverable. That told me that the email was actually sending to AOL, but just not making past their security for spoofing and preventing spam.
Thanks.
-Dman100-






Similar Threads
Thread Thread Starter Forum Replies Last Post
CDO.Message utf-8 Problem hellsa Classic ASP Professional 2 June 28th, 2009 11:02 PM
Source: CDO.Message.1 please help me:) ilknur SQL Server 2000 1 July 23rd, 2006 12:52 PM
Need help related CDO.Message shankhan Classic ASP Basics 9 January 2nd, 2005 07:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.