rabbits2
asked on
CDO.Message.1 error '80040213' The transport failed to connect to the server.
I am trying to send an email from my .asp page and I am getting this error:
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
.asp, line 232
Line 232 is:
.Send
My code on the submit page is:
Dim strSender
Dim strRecipientsName
Dim strRecipients
Dim strSubject
Dim strMessage
strRecipientsName = "me@hotmail.com"
strRecipients = Request.Form("txt_email")
strSubject = "From: " & Request.Form("txt_email") & " Picture"
strMessage = "Hello " & Request.Form("txt_query") & vbCrLf & vbCrLf
strMessage = strMessage & Request.Form("txt_query") & vbCrLf & vbCrLf
strMessage = strMessage & "You received this from : " & Request.Form("txt_email") & " " & Request.Form("txt_email")
strSender = Request.Form("txt_email")
If (("" & strSender) <> "" ) and (("" & strRecipients) <> "" ) Then
Set objMail = Server.CreateObject("CDO.M essage")
With objMail
.From = strSender
.To = strRecipients
.Subject = strSubject
.HTMLBody = strMessage
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "ampsrc.com"
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Configuration.Fields.Upda te
.Send
End With
Set objMail = Nothing
End
SQLINSERT = "INSERT INTO tbl_queries(name,date_appl ied,email, subject,qu ery) values('" & replace(session ("name"), "'", "")& "',#" & date & "#,'" & replace(session ("email"), "'", "")& "','" & replace(session ("subject"), "'", "")& "','" & replace(session ("query"), "'", "")& "')"
objConn.execute(SQLINSERT)
Else
Response.write "There has been a prblem sending your email, please......"
End if
%>
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
.asp, line 232
Line 232 is:
.Send
My code on the submit page is:
Dim strSender
Dim strRecipientsName
Dim strRecipients
Dim strSubject
Dim strMessage
strRecipientsName = "me@hotmail.com"
strRecipients = Request.Form("txt_email")
strSubject = "From: " & Request.Form("txt_email") & " Picture"
strMessage = "Hello " & Request.Form("txt_query") & vbCrLf & vbCrLf
strMessage = strMessage & Request.Form("txt_query") & vbCrLf & vbCrLf
strMessage = strMessage & "You received this from : " & Request.Form("txt_email") & " " & Request.Form("txt_email")
strSender = Request.Form("txt_email")
If (("" & strSender) <> "" ) and (("" & strRecipients) <> "" ) Then
Set objMail = Server.CreateObject("CDO.M
With objMail
.From = strSender
.To = strRecipients
.Subject = strSubject
.HTMLBody = strMessage
.Configuration.Fields.Item
.Configuration.Fields.Item
.Configuration.Fields.Item
.Configuration.Fields.Upda
.Send
End With
Set objMail = Nothing
End
SQLINSERT = "INSERT INTO tbl_queries(name,date_appl
objConn.execute(SQLINSERT)
Else
Response.write "There has been a prblem sending your email, please......"
End if
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
Vee_Mod
Community Support Moderator
This was great. the 'Answer' is:
SendUsing = 1
and
Flds( _
"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") _
= "c:\inetpub\mailroot\picku p"
Set the pickup directory to the actual pickup directory of your email server. In my case it was
d:\program files\exchsrvr\mailroot\vs i 1\pickup.
Sending it to c:\inetpub\mailroot\pickup won't work if your email server is not using it to pick up mail.
SendUsing = 1
and
Flds( _
"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") _
= "c:\inetpub\mailroot\picku
Set the pickup directory to the actual pickup directory of your email server. In my case it was
d:\program files\exchsrvr\mailroot\vs
Sending it to c:\inetpub\mailroot\pickup
it should be something like mail.ampsrc.com or smtp.ampsrc.com