nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Cdosys In Asp, Configuration Parameters needed
ChrisLucas
post Mar 19 2010, 08:25 AM
Post #1





Group: Verified NS Member
Posts: 1
Joined: 19-March 10
Member No.: 8,632



Hey all,
I am trying to use CDOSYS in my ASP application on the Network Solutions server. I keep getting:

CDO.Message.1 error '80040213'
The transport failed to connect to the server.

...here is my code...

Set myMail=server.CreateObject("CDO.Message")
Set myMailConfig = Server.CreateObject ("CDO.Configuration")
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.localhost.com"
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 2525
myMailConfig.Fields.Update
Set myMail.Configuration = myMailConfig
myMail.Subject = "Global Message"
myMail.From = "xxxx@xxxxxxxxxx.com"
myMail.To = "xxxx@xxxxxxxxxx.com"
myMail.TextBody = "Blah"
myMail.Send

Can anyone help me out where this is going wrong?

Thank You in advance,
Chris
Go to the top of the page
 
+Quote Post
erica
post Apr 28 2010, 03:05 PM
Post #2





Group: Verified NS Member
Posts: 1
Joined: 28-April 10
Member No.: 9,398



I am running into the same issue - did you get this resolved?
Go to the top of the page
 
+Quote Post
cesar1963
post Apr 28 2010, 09:43 PM
Post #3





Group: Verified NS Member
Posts: 2
Joined: 27-April 10
Member No.: 9,385



QUOTE (ChrisLucas @ Mar 19 2010, 09:25 AM) *
Hey all,
I am trying to use CDOSYS in my ASP application on the Network Solutions server. I keep getting:

CDO.Message.1 error '80040213'
The transport failed to connect to the server.

...here is my code...

Set myMail=server.CreateObject("CDO.Message")
Set myMailConfig = Server.CreateObject ("CDO.Configuration")
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.localhost.com"
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 2525
myMailConfig.Fields.Update
Set myMail.Configuration = myMailConfig
myMail.Subject = "Global Message"
myMail.From = "xxxx@xxxxxxxxxx.com"
myMail.To = "xxxx@xxxxxxxxxx.com"
myMail.TextBody = "Blah"
myMail.Send

Can anyone help me out where this is going wrong?

Thank You in advance,
Chris



try this
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
myMailConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

Also check the post "formail asp" there is a nice working send mail asp script, read the whole post.

Go to the top of the page
 
+Quote Post
carrzdream
post Aug 31 2010, 01:56 PM
Post #4





Group: Verified NS Member
Posts: 7
Joined: 31-August 10
Member No.: 10,975



For anyone that runs into this issue again here on NS Servers
You will need to have your username(Email) and password provided within the script.
If not, then it does not work.

Provided below is a working code that I have been using on all the sites I design for years.
Good Luck And Enjoy.

Carrzdream

CODE
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") ="smtp.yourdomain.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@yourdomain.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="********"
    
myMail.Configuration.Fields.Update

EM = request.form("Email")

myMail.To =  EM
myMail.Subject = "Hello from all over the world"
myMail.From = "webmaster@yourdomain.com"

myMail.Send
Set myMail = Nothing
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2011 Time is now: 22nd November 2017 - 07:45 AM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates