Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2004, 05:15 PM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default EMail setup from square zero...

Forgive me on the long-winded verbages below but I am REALLY frustrated! (Again, forgive me...)

I have read every conceivable ASP article on every possible ASP forum regarding everything needed to setup, install, and actually run a *working* mail server on the same old Dell machine that currently does a great job as my personal (home network) web server. It's a (old) Optiplex GX1 w/ 3/4-ton RAM (768MB) running Windows 2000 server (not Advanced) with every M$-specified hotfix, patch, update, etc. As I said it does fine as a web server, but try to get it to send out SMTP mail is currently harder and less productive than using my head as an axe to chop wood for the coming winter.

I have tried using the CDONTS (I registered and re-registered the cdonts.dll file) setup as well as the CDOSYS route and both tell me the emailing was successful but the remote internet-based email accounts (tried at least 3 different accounts: Yahoo, Netscape, Hotmail) receive no emails from my server (yes, I can send and forward from within Yahoo, Netscape, Hotmail, etc.).

For grins I'm posting both CDO[NTS and SYS] .asp files here:

<%
Dim objCDOMail
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = "[email protected]"
objCDOMail.To = "[email protected]"
objCDOMail.Subject = "An email test"
objCDOMail.BodyFormat = 0
objCDOMail.Body = "This is a test and ONLY a test..." & vbcrlf
objCDOMail.Send
Set objCDOMail = Nothing
%>
This can only mean that your eMail was successful...


...and the CDOSYS file:

<%
Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set objFields = objConfig.Fields
With objFields
.Item("http://schemas.microsoft.com/cdo/configuration/SendUsing")= 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "http://127.0.0.1"
.Item("http://schemas.microsoft.com/cdo/configuration/SMTPServerPort")= 25
.Update
End With
With objMail
Set .Configuration = objConfig
.To = "[email protected]"
.From = "[email protected]"
.Subject = "This is a test"
.textbody = "Please work, I have no more hair left..."
.Send
End With
%>
If you see this then the email must be successful...


For either one I get the expected '...successful...' message with no errors from my web server but no emails in the expected internet inboxes. Snooping around the web server I noticed there are several .EML files sitting in the \Inetpub\mailroot\Queue folder that appear to be my missing emails - why aren't they on Netscape.net and/or Yahoo.com?

At this point I have 2 general questions:
1. Is there some ASP code that will confirm my SMTP setup/install is correct? If not any ASP code then please, be VERY detailed on any other checks I should do;
2. The only denominator left unchecked thus far in my home network equation is a Belkin router that is configured to be stealthier than the Predator (check your stealthiness at Steve Gibson's Shields Up site @ https://www.grc.com/x/ne.dll?bh0bkyd2). I'm wondering if there are certain ports/other configs in need of change to fix this problem?
 
Old September 20th, 2004, 01:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What mail server did you install? Do your messages end up in the Queue folder?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old September 20th, 2004, 01:51 PM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Originally posted by Imar

What mail server did you install? - Huh? I thought all that was needed was the SMTP service from M$ which would 'send' my emails out to the internet mailboxes as specified in the 'To' field. Other than the built-in SMTP service, the answer to this question is NONE - do I need some 3rd party app on top of this?

Do your messages end up in the Queue folder? - Yes: several files ending with .EML.

What are your thoughts on my suspect router configuration(s)? Should one or more ports be 'opened' a certain way?
 
Old September 20th, 2004, 02:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah, OK, so you're using MS SMTP Server. That's fine; no third party stuff is necessary. It was of course possible that you were using something else.

It could be that your local SMTP server cannot handle / forward message to the Internet. For that to work, you may need to set a Smart Host / Relaying server. Check out the following article for info on that:

http://support.microsoft.com/default...NoWebContent=1

This way, the Smart Host will be responsible for sending the e-mail; your machine just drops it at that host. Usually, you need to fill in something like smtp.YourISP.Com

If you want to test your Smart Host setup, try this:
http://support.microsoft.com/default...b;en-us;297988

You could also try changing the From address. Some mail severs will block out going mail (or incoming mail) when the sender is not from the same domain as the domain the e-mail comes from. In your case, the @Netscape account be causing troubles.

Also make sure that your network allows mail traffic. SMTP uses port 25 so make sure that port doesn't get blocked.

If none of this works, I think I am out of ideas. I am not a network and e-mail guy, so this is about all I know about this subject ;)

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Empty Page by Sonic Youth (Track 1 from the album: Murray Street) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
drawing a square wave nyc9 Visual C++ 1 December 31st, 2006 09:16 AM
Ch. 11 Email setup question amenne20 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 October 1st, 2006 04:04 PM
Ch. 11 Email setup question amenne20 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 1st, 2006 04:03 PM
Square Brackets in Form Names dylan_b JSP Basics 1 July 11th, 2006 02:29 PM
Square root Ashleek007 C++ Programming 3 December 12th, 2004 04:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.