Asp Error for mail Sending

  • nab_d25e15
  • Born
  • Born
  • nab_d25e15
  • Posts: 1

Post 3+ Months Ago

hi.....

This is Naresh , since i am new to asp i have some difficult in mail sending coding

this my coding please help me

error:
Error Type:
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.

my coding:

<!--#include file="connopen.asp"-->
<!--METADATA TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib"
UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to Bonafides Nature Health Beauty Face Essentials, Eye &amp; Neck Essentials, Lip &amp; Ear Essentials, Spa Essentials, Hair Services &amp; Peeling Treatment</title>
</head>
<body>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select emailaddress,password from Users_Info where emailaddress='"&TRIM(request.Form("emailaddress"))&"'",con,1,2
if (rs.recordcount = "1") then
'Mail Code
'Set myMail=server.CreateObject("CDO.Message")
'myMail.Subject="Forgot Password Details From http://www.bonafidesbeaute.com"
'myMail.From="venkat@healbeau.com"
'myMail.To=request.Form("emailaddress")
dim mailcode
mailcode=mailcode &"<style type=text/css>"
mailcode=mailcode &"<!--"
mailcode=mailcode &".style2 {"
mailcode=mailcode &" font-size: 11px;"
mailcode=mailcode &" font-family: Verdana, Arial, Helvetica, sans-serif;"
mailcode=mailcode &" font-weight: bold;"
mailcode=mailcode &"}"
mailcode=mailcode &"-->"
mailcode=mailcode &"</style>"
mailcode=mailcode &"<table width=100% border=0 cellspacing=4 cellpadding=4>"
mailcode=mailcode &"<tr>"
mailcode=mailcode &"<td class=style2>Forgot Password Details From http://www.bonafidesbeaute.com</td>"
mailcode=mailcode &"</tr>"
mailcode=mailcode &"<tr>"
mailcode=mailcode &"<td class=style2><strong><u>Password :</u></strong>"&rs(1)&"</td>"
mailcode=mailcode &"</tr>"
mailcode=mailcode &"</table>"
'myMail.HTMLBody = mailcode
'myMail.Send
'set myMail=nothing
'Mail Code
'on error resume next
'sch = "http://schemas.microsoft.com/cdo/configuration/"


Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoConfig = Server.CreateObject("CDO.Configuration")

cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "grafotech.org"
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 25
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 150
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "naresh@grafotech.org"
cdoConfig.fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword"

cdoConfig.fields.update

Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "venkat@healbeau.com"
cdoMessage.To ="sreeman@grafotech.org"
cdoMessage.Subject ="Forgot Password Details From http://www.bonafidesbeaute.com"
cdoMessage.HtmlBody = mailcode
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.Write(err.description)
con.close
response.Redirect("Forgot_Password_Sent.asp")
else
con.close
response.Redirect("Forgot_Password.asp?Q=error")
end if
%>
</body>
</html>
"i am using IIs server and Xp servise pack2"
please help me
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 178 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.