Jump to content

CDO doesn't send message


Guest colesslow

Recommended Posts

Guest colesslow

i've this code to send message..i'm really confused bcoz no error message display but i still don't receive the email..i've no idea what's happening..this is the code<!--#INCLUDE file ="conn.asp"--> <HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <% dim reqEmail reqEmail=Request.Form ("Email") %> <% IF reqEmail <> "" THEN%> <% DIM mySQL, objRS mySQL = "SELECT * FROM rct_User WHERE Email = '" & reqEmail & "'" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open mySQL, connection IF objRS.EOF THEN Response.Write "That email address was not found in our database. " ELSE DIM strPassword,struName struName=objRS("uName") strPassword = objRS("Pwd") DIM mail, objMail,strBody Set objMail = CreateObject("CDO.Message") objMail.Subject = "Login Information" objMail.From = "mymail@mydomain.com" objMail.To = reqEmail strBody = "Your User Name is" & struName strBody = strBody & "Your password is" & strPassword objMail.textBody=strBody objMail.Send Set objMail = nothing Response.Write("<script language=""javascript"">alert('Your password has been sent to your email address');</script>") END IF ELSE Response.Write "Please click Back on your browser and enter the email address you registered with." END IF %></HTML>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...