?
Solved

Trying CDO.Message with Windows Hosted Network Solutions, no error, no e-mail is sent?

Posted on 2008-10-12
2
Medium Priority
?
1,219 Views
Last Modified: 2013-12-14
I have used CDO.Message many times with providers (1 and 1, ReadyHosting), but have never had this experience.

I have a "tell a friend" script I am using, but for some reason, I don't get an error but the e-mail is not sent.

Code attached.
Set Mail = Server.CreateObject("CDO.Message")
		Set objConfig = Server.CreateObject("CDO.Configuration") 
		
		'Configuration:
		objConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtpserver -- verified"
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")=1 
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user@domain"
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
		objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
		'Update configuration 
		objConfig.Fields.Update 
		Set Mail.Configuration = objConfig
 
		Mail.From = "valid and verified e-mail address"
		Mail.To = strEmail
		Mail.Subject = strSubject
		strBody = "A message from: " & strSenderEmail & "<br><br>I am sending this to you because I believe this is a website you should check out!<br><br>"
		Mail.HTMLBody = strBody
		On Error Resume Next
		Mail.Send
		If Err.Number <> 0 Then
			Response.Write "An error encountered: " & Err.Description & "<br>"
		Else %>
			&nbsp;&nbsp;Thank you for your help in getting our message out!<br><br>&nbsp;&nbsp;Click Back on your browser or <a href="tell_a_friend.asp">click here to send another e-mail.</a>
		<% End If

Open in new window

0
Comment
Question by:padlake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 22701415

If it seems to be successfully delivering to an SMTP server we will need to check the SMTP logs to determine what happened to the message.

Chris
0
 

Accepted Solution

by:
padlake earned 0 total points
ID: 22706632
Network Solutions CDOSYS does not require authentication to send e-mail, therefore this question is resolved.
Set myEmail = Server.CreateObject("CDO.Message")
		schemasURL = "http://schemas.microsoft.com/cdo/configuration/"
		With myEmail.Configuration.Fields
		.Item(schemasURL & "sendusing") = 2
		.Item(schemasURL & "smtpserver") = "localhost"
		.Item(schemasURL & "smtpconnectiontimeout") = 10
		.Item(schemasURL & "smtpserverport") = 25
		.Item (schemasURL & "smtpusessl") = False
		.Item (schemasURL & "smtpconnectiontimeout") = 60
		.Update
		End With
		
		myEmail.From = "email@domain.com"
		myEmail.To = strEmail
		myEmail.BCC = "email@domain.com"
		myEmail.Subject = strSubject
		strBody = "A message from: " & strSenderEmail & "<br><br>I am sending this to you because I believe this is a website you should check out!<br><br>"
		strBody = strBody & "I just found <br><br>website domain.com"
		myEmail.HTMLBody = strBody
		On Error Resume Next
		myEmail.Send
		If Err.Number <> 0 Then
			Response.Write "An error encountered: " & Err.Description & "<br>"
		Else %>
			&nbsp;&nbsp;Thank you for your help in getting our message out!<br><br>&nbsp;&nbsp;Click Back on your browser or <a href="tell_a_friend.asp">click here to send another e-mail.</a>
		<% End If
		Set myEmail = Nothing

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question