SMTP for email routing

Good day

We want to setup Microsoft exchange (windows 2003 server) to be able to accept SMTP email from an ASP page on another server and the server must then route the email to the correct recipient.

For example with CDO.Message, we want to do the following:


  ' Set the mail server configuration
  Set objConfig=Server.CreateObject("CDO.Configuration")
  objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort

  Set CMail = Server.CreateObject("CDO.Message")
  Set CMail.Configuration=objConfig  
  CMail.From = sFrom
  CMail.To = sTo
  CMail.Subject = sSubject
  CMail.TextBody = sBody
  Set CMail = Nothing

Open in new window

We managed to start the SMTP service on the server, to test it we use Microsoft Mail to send email to the server, and that is working, but it does not route it to the recipient's address.
So in other words, when we sent the email it shows it was sent, but we do not receive it.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This really depends on your Exchange version, which you have not specified.

I have Exchange 2003 running on Server 2003.  If you've the same configuration, here's what  you need to do.  On the Exchange server:
- Open Exchange System Manager
- Browse to Servers / (your server name) / Protocols / SMTP / Default SMTP Virtual Server
- Right-click and select Properties
- Click on the Access tab
- Click on the Relay button
- Click Add, Single Computer, Enter the IP address of the system where your e-mails will be originating, then click OK to close the 'Computer' dialog
- Click OK to close the 'Relay Restrictions' dialog
- Click OK to close the 'Default SMTP Virtual Servers' dialog
- Close the Exchange System Manager

Now, try sending your e-mails again, and it should work...
Since what you basically what is your exchange server to relay emails from the 2'nd server, have you set up relay on your exchange server ?

Pls check section (2) of
koossaAuthor Commented:

Yes, we have done exactly that, but still don't get the emails?
We are using Windows server 2003.

We can see the emails in C:\Program Files\Exchsrvr\Mailroot\vsi 1\Queue, but we don't receive it.
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

are you able to see the messages in your exchange server queue ?

also is the 'from address' on the emails exactly same as that of the domains set up on your exchange server ?
koossaAuthor Commented:
Yes, I can see them in the queue
At this stage the from email address is exactly the same, but when implementing it on ASP, we want the from to be different email addresses.
What are you using to route oubound emails in your SMTP connector ? Route through DNS or another SMTP server ?
koossaAuthor Commented:
We're using route through DNS
The To address on these emails - are they external email addresses or internal test ones ?
koossaAuthor Commented:
The To addresses are all external ones.
Weird.... Please check message tracking logs and see if it actually says "Message Routed and Queued for Remote Delivery"

Have to tried restarting SMTP service as well as DNS service ?
if it does'nt work, what happens if you try and create an SMTP connector for the emails coming from this email address and route it through your ISP's smtp server ?
one another question - is the from address "" ?
koossaAuthor Commented:
no, that's just an example, we have created a user for
Hmm.. Let me know once you've tried the stuffs in my comment above.
koossaAuthor Commented:
We've restarted the DNS and SMTP services in computer management > administrative tools >services. Still the same problem. The funny thing is that we've used this server previously as a web server, and then the web emails went out with the above code (but without the username and password settings). Some of the old pages are still on the server and now that we've created a user to work with the SMTP service, the old pages emails are also staying in the queue.
koossaAuthor Commented:
I have stopped and started the SMTP virtual server under SMTP in the Exchange system manager and most messages went out. When I send new messages to the queue they again do not go out. When I click on the messages in the queue, I get the following Additional queue information "The connection was dropped due to an SMTP protocol event sink."
ahhhh, smtp virtual server.. can't believe how I missed that... anyways, in regards to the virtual server info,

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.