Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

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:

  sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
  smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"
  AuthURL="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
  UserURL="http://schemas.microsoft.com/cdo/configuration/sendusername"
  PassURL="http://schemas.microsoft.com/cdo/configuration/sendpassword"

  ' Set the mail server configuration
  Set objConfig=Server.CreateObject("CDO.Configuration")
  objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort
  objConfig.Fields.Item(smtpUrl)="mail.mydomain.com"
  
  objConfig.Fields.Item(AuthURL)=1
  objConfig.Fields.Item(UserURL)="postmaster@mydomain.com"
  objConfig.Fields.Item(PassURL)="mypassword"
  
  objConfig.Fields.Update

  Set CMail = Server.CreateObject("CDO.Message")
  Set CMail.Configuration=objConfig  
  CMail.From = sFrom
  CMail.To = sTo
  CMail.Subject = sSubject
  CMail.TextBody = sBody
  CMail.Send
  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.
0
koossa
Asked:
koossa
  • 8
  • 7
1 Solution
 
apresenceCommented:
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...
0
 
Mkris9Commented:
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 http://www.servolutions.com/support/config_exchange_2003.htm
0
 
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.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
Mkris9Commented:
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 ?
0
 
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.
0
 
Mkris9Commented:
What are you using to route oubound emails in your SMTP connector ? Route through DNS or another SMTP server ?
0
 
koossaAuthor Commented:
We're using route through DNS
0
 
Mkris9Commented:
The To address on these emails - are they external email addresses or internal test ones ?
0
 
koossaAuthor Commented:
The To addresses are all external ones.
0
 
Mkris9Commented:
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 ?
0
 
Mkris9Commented:
one another question - is the from address "postmaster@mydomain.com" ?
0
 
koossaAuthor Commented:
no, that's just an example, we have created a user for @mydomain.com
0
 
Mkris9Commented:
Hmm.. Let me know once you've tried the stuffs in my comment above.
0
 
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.
0
 
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."
0
 
Mkris9Commented:
ahhhh, smtp virtual server.. can't believe how I missed that... anyways, in regards to the virtual server info, http://www.experts-exchange.com/Networking/Email_Groupware/Exchange_Server/Q_21110083.html
0
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.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now