CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
CDO.Message.1 error '80040213' The transport failed to connect to the server.
- Article ID:
199 - Date Created
Wednesday, January 23, 2013 - Last Updated
Wednesday, January 23, 2013 - This Article Has been Viewed
9838 times - Short Desc
Sometimes when setting up for CDOSYS, you make set the smtpusessl improperly. When this happens, your page generates the transport failed to connect to the server error. - Details
When sending mail with CDOSYS, you have to make sure that your smtpusessl is setup correctly, if not, you will experience the following error.CDO.Message.1 error '80040213'
The transport failed to connect to the server.
/mail.asp, line 24 - Recreate Issue
To reproduce this issue:
In your CDOSYS Mail, you have the following line.<%
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
%>
You can see where the end, we have true.
If your server sends mail through SSL, then this is correct, however, if your mail server does not send through an SSL, than this is incorrect. - Resolve Issue
To resolve this issue.
With the above code, do one of the following Scenario's
Scenario #1:
Sending SSL, then change False to True
Scenario #2:
Not Sending SSL, then change True to False
Scenario #3:
If you do not have the line of code in your mail script, then you must add it in.
You should then be able to send your mail.
Full Working Mail Script<%
Set myMail = CreateObject("CDO.Message")
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.domain.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = false 'Use SSL for the connection (True or False)
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="webmaster@domain.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="********"
myMail.Configuration.Fields.Update
email = "name@somedomain.com"
myMail.To = ""&email&""
myMail.Subject = "KB Email Confirmation"
myMail.From = "support@domain.com (KB)"
myMail.HTMLBody = "This is line one<br />"
myMail.HTMLBody = myMail.HTMLBody &"This is line 2<br />"
myMail.HTMLBody = myMail.HTMLBody &"<div style=""text-align:center; vertical-align:top""><blockquote style=""color:#999999;""> KB is A %AEComapny Name Here©2000-"&Year(Now())&" Company</blockquote>"
myMail.Send
response.Write "Mail Sent Successfully!<br />Check your Inbox for: "&email
Set myMail = Nothing
%>
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19545
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826